Set maxAnisotropy to 1.0f instead of 0.0f (Fixes validation errors, refs #277)
This commit is contained in:
parent
a6ddaf3996
commit
904d785c20
4 changed files with 4 additions and 11 deletions
|
|
@ -312,6 +312,7 @@ public:
|
||||||
samplerInfo.minLod = 0.0f;
|
samplerInfo.minLod = 0.0f;
|
||||||
samplerInfo.maxLod = 1.0f;
|
samplerInfo.maxLod = 1.0f;
|
||||||
samplerInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
samplerInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||||
|
samplerInfo.maxAnisotropy = 1.0f;
|
||||||
VK_CHECK_RESULT(vkCreateSampler(vulkanDevice->logicalDevice, &samplerInfo, nullptr, &sampler));
|
VK_CHECK_RESULT(vkCreateSampler(vulkanDevice->logicalDevice, &samplerInfo, nullptr, &sampler));
|
||||||
|
|
||||||
// Descriptor
|
// Descriptor
|
||||||
|
|
|
||||||
|
|
@ -523,6 +523,7 @@ namespace vks
|
||||||
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
||||||
samplerCreateInfo.minLod = 0.0f;
|
samplerCreateInfo.minLod = 0.0f;
|
||||||
samplerCreateInfo.maxLod = 0.0f;
|
samplerCreateInfo.maxLod = 0.0f;
|
||||||
|
samplerCreateInfo.maxAnisotropy = 1.0f;
|
||||||
VK_CHECK_RESULT(vkCreateSampler(device->logicalDevice, &samplerCreateInfo, nullptr, &sampler));
|
VK_CHECK_RESULT(vkCreateSampler(device->logicalDevice, &samplerCreateInfo, nullptr, &sampler));
|
||||||
|
|
||||||
// Create image view
|
// Create image view
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,7 @@ public:
|
||||||
sampler.addressModeV = sampler.addressModeU;
|
sampler.addressModeV = sampler.addressModeU;
|
||||||
sampler.addressModeW = sampler.addressModeU;
|
sampler.addressModeW = sampler.addressModeU;
|
||||||
sampler.mipLodBias = 0.0f;
|
sampler.mipLodBias = 0.0f;
|
||||||
sampler.maxAnisotropy = 0;
|
sampler.maxAnisotropy = 1.0f;
|
||||||
sampler.minLod = 0.0f;
|
sampler.minLod = 0.0f;
|
||||||
sampler.maxLod = 1.0f;
|
sampler.maxLod = 1.0f;
|
||||||
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||||
|
|
|
||||||
|
|
@ -217,15 +217,6 @@ public:
|
||||||
textures.ssaoNoise.destroy();
|
textures.ssaoNoise.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void getEnabledFeatures()
|
|
||||||
{
|
|
||||||
// Enable anisotropic filtering if supported
|
|
||||||
if (deviceFeatures.samplerAnisotropy) {
|
|
||||||
enabledFeatures.samplerAnisotropy = VK_TRUE;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Create a frame buffer attachment
|
// Create a frame buffer attachment
|
||||||
void createAttachment(
|
void createAttachment(
|
||||||
VkFormat format,
|
VkFormat format,
|
||||||
|
|
@ -529,7 +520,7 @@ public:
|
||||||
sampler.addressModeV = sampler.addressModeU;
|
sampler.addressModeV = sampler.addressModeU;
|
||||||
sampler.addressModeW = sampler.addressModeU;
|
sampler.addressModeW = sampler.addressModeU;
|
||||||
sampler.mipLodBias = 0.0f;
|
sampler.mipLodBias = 0.0f;
|
||||||
sampler.maxAnisotropy = 0;
|
sampler.maxAnisotropy = 1.0f;
|
||||||
sampler.minLod = 0.0f;
|
sampler.minLod = 0.0f;
|
||||||
sampler.maxLod = 1.0f;
|
sampler.maxLod = 1.0f;
|
||||||
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue