Enable required device features (validation) (Refs #277)
This commit is contained in:
parent
153e555447
commit
4094aa0ea0
5 changed files with 88 additions and 6 deletions
|
|
@ -214,6 +214,25 @@ public:
|
|||
vkDestroySemaphore(device, offscreenSemaphore, nullptr);
|
||||
}
|
||||
|
||||
// Enable physical device features required for this example
|
||||
virtual void getEnabledFeatures()
|
||||
{
|
||||
// Enable anisotropic filtering if supported
|
||||
if (deviceFeatures.samplerAnisotropy) {
|
||||
enabledFeatures.samplerAnisotropy = VK_TRUE;
|
||||
}
|
||||
// Enable texture compression
|
||||
if (deviceFeatures.textureCompressionBC) {
|
||||
enabledFeatures.textureCompressionBC = VK_TRUE;
|
||||
}
|
||||
else if (deviceFeatures.textureCompressionASTC_LDR) {
|
||||
enabledFeatures.textureCompressionASTC_LDR = VK_TRUE;
|
||||
}
|
||||
else if (deviceFeatures.textureCompressionETC2) {
|
||||
enabledFeatures.textureCompressionETC2 = VK_TRUE;
|
||||
}
|
||||
};
|
||||
|
||||
// Create a frame buffer attachment
|
||||
void createAttachment(
|
||||
VkFormat format,
|
||||
|
|
@ -427,7 +446,7 @@ public:
|
|||
sampler.addressModeV = sampler.addressModeU;
|
||||
sampler.addressModeW = sampler.addressModeU;
|
||||
sampler.mipLodBias = 0.0f;
|
||||
sampler.maxAnisotropy = 0;
|
||||
sampler.maxAnisotropy = 1.0f;
|
||||
sampler.minLod = 0.0f;
|
||||
sampler.maxLod = 1.0f;
|
||||
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue