gfxstream: Fix min max reduction samplers v2

Test: dEQP-VK.pipeline.monolithic.sampler.view_type.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
This commit is contained in:
Serdar Kocdemir 2025-06-03 15:42:24 +00:00 committed by Marge Bot
parent bc79017f87
commit 73d94d70f1

View file

@ -4669,8 +4669,8 @@ VkResult ResourceTracker::on_vkCreateSampler(void* context, VkResult, VkDevice d
VkSampler* pSampler) {
VkSamplerCreateInfo localCreateInfo = vk_make_orphan_copy(*pCreateInfo);
#if defined(VK_USE_PLATFORM_ANDROID_KHR) || defined(VK_USE_PLATFORM_FUCHSIA)
vk_struct_chain_iterator structChainIter = vk_make_chain_iterator(&localCreateInfo);
#if defined(VK_USE_PLATFORM_ANDROID_KHR) || defined(VK_USE_PLATFORM_FUCHSIA)
VkSamplerYcbcrConversionInfo localVkSamplerYcbcrConversionInfo;
const VkSamplerYcbcrConversionInfo* samplerYcbcrConversionInfo =
vk_find_struct_const(pCreateInfo, SAMPLER_YCBCR_CONVERSION_INFO);
@ -4691,6 +4691,15 @@ VkResult ResourceTracker::on_vkCreateSampler(void* context, VkResult, VkDevice d
}
#endif
VkSamplerReductionModeCreateInfo localVkSamplerReductionModeCreateInfo;
const VkSamplerReductionModeCreateInfo* samplerReductionModeCreateInfo =
vk_find_struct_const(pCreateInfo, SAMPLER_REDUCTION_MODE_CREATE_INFO);
if (samplerReductionModeCreateInfo) {
localVkSamplerReductionModeCreateInfo =
vk_make_orphan_copy(*samplerReductionModeCreateInfo);
vk_append_struct(&structChainIter, &localVkSamplerReductionModeCreateInfo);
}
VkEncoder* enc = (VkEncoder*)context;
return enc->vkCreateSampler(device, &localCreateInfo, pAllocator, pSampler, true /* do lock */);
}