mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 06:26:30 +00:00
Fix anisotropy being lost when applying bias to sampler
This commit is contained in:
@@ -829,7 +829,7 @@ QVariantList VulkanPipelineStateViewer::makeSampler(const QString &bindset, cons
|
||||
|
||||
filter = ToQStr(descriptor.filter);
|
||||
|
||||
if(descriptor.maxAnisotropy > 1.0f)
|
||||
if(descriptor.maxAnisotropy >= 1.0f)
|
||||
filter += lit(" Aniso %1x").arg(descriptor.maxAnisotropy);
|
||||
|
||||
if(descriptor.filter.filter == FilterFunction::Comparison)
|
||||
|
||||
@@ -952,7 +952,7 @@ void VulkanCreationInfo::Sampler::Init(VulkanResourceManager *resourceMan, Vulka
|
||||
address[1] = pCreateInfo->addressModeV;
|
||||
address[2] = pCreateInfo->addressModeW;
|
||||
mipLodBias = pCreateInfo->mipLodBias;
|
||||
maxAnisotropy = pCreateInfo->anisotropyEnable ? pCreateInfo->maxAnisotropy : 1.0f;
|
||||
maxAnisotropy = pCreateInfo->anisotropyEnable ? pCreateInfo->maxAnisotropy : 0.0f;
|
||||
compareEnable = pCreateInfo->compareEnable != 0;
|
||||
compareOp = pCreateInfo->compareOp;
|
||||
minLod = pCreateInfo->minLod;
|
||||
|
||||
@@ -1742,7 +1742,7 @@ void VulkanReplay::SavePipelineState(uint32_t eventId)
|
||||
|
||||
// sampler info
|
||||
el.filter = MakeFilter(sampl.minFilter, sampl.magFilter, sampl.mipmapMode,
|
||||
sampl.maxAnisotropy > 1.0f, sampl.compareEnable,
|
||||
sampl.maxAnisotropy >= 1.0f, sampl.compareEnable,
|
||||
sampl.reductionMode);
|
||||
el.addressU = MakeAddressMode(sampl.address[0]);
|
||||
el.addressV = MakeAddressMode(sampl.address[1]);
|
||||
|
||||
@@ -724,6 +724,7 @@ public:
|
||||
sampInfo.addressModeV = samplerProps.address[1];
|
||||
sampInfo.addressModeW = samplerProps.address[2];
|
||||
sampInfo.mipLodBias = samplerProps.mipLodBias;
|
||||
sampInfo.anisotropyEnable = samplerProps.maxAnisotropy >= 1.0f;
|
||||
sampInfo.maxAnisotropy = samplerProps.maxAnisotropy;
|
||||
sampInfo.compareEnable = samplerProps.compareEnable;
|
||||
sampInfo.compareOp = samplerProps.compareOp;
|
||||
|
||||
Reference in New Issue
Block a user