From 49ed69369ee3c931bc8b595d5ebc6048e63b8a47 Mon Sep 17 00:00:00 2001 From: Amber Date: Mon, 10 Apr 2023 13:48:36 +0200 Subject: [PATCH] turnip: make sampler_minmax support configurable. Signed-off-by: Amber Amber Part-of: --- src/freedreno/common/freedreno_dev_info.h | 1 + src/freedreno/common/freedreno_devices.py | 2 ++ src/freedreno/vulkan/tu_device.cc | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h index 121a5e6f78e..9debe894ea9 100644 --- a/src/freedreno/common/freedreno_dev_info.h +++ b/src/freedreno/common/freedreno_dev_info.h @@ -183,6 +183,7 @@ struct fd_dev_info { bool supports_double_threadsize; + bool has_sampler_minmax; struct { uint32_t PC_POWER_CNTL; uint32_t TPL1_DBG_ECO_CNTL; diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py index 1a8a91640e1..6d1e8cc56ad 100644 --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py @@ -156,6 +156,7 @@ class A6xxGPUInfo(GPUInfo): self.a6xx.has_gmem_fast_clear = True self.a6xx.has_hw_multiview = True self.a6xx.has_fs_tex_prefetch = True + self.a6xx.has_sampler_minmax = True self.a6xx.sysmem_per_ccu_cache_size = 64 * 1024 self.a6xx.gmem_ccu_color_cache_fraction = CCUColorCacheFraction.QUARTER.value @@ -256,6 +257,7 @@ a6xx_gen1 = dict( a6xx_gen1_low = {**a6xx_gen1, **dict( has_gmem_fast_clear = False, has_hw_multiview = False, + has_sampler_minmax = False, has_fs_tex_prefetch = False, sysmem_per_ccu_cache_size = 8 * 1024, gmem_ccu_color_cache_fraction = CCUColorCacheFraction.HALF.value, diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index eebac3234cc..f1c5ab256e5 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -252,7 +252,7 @@ get_device_extensions(const struct tu_physical_device *device, .EXT_rasterization_order_attachment_access = true, .EXT_robustness2 = true, .EXT_sample_locations = device->info->a6xx.has_sample_locations, - .EXT_sampler_filter_minmax = true, + .EXT_sampler_filter_minmax = device->info->a6xx.has_sampler_minmax, .EXT_scalar_block_layout = true, .EXT_separate_stencil_usage = true, .EXT_shader_demote_to_helper_invocation = true, @@ -377,7 +377,8 @@ tu_get_features(struct tu_physical_device *pdevice, features->descriptorBindingVariableDescriptorCount = true; features->runtimeDescriptorArray = true; - features->samplerFilterMinmax = true; + features->samplerFilterMinmax = + pdevice->info->a6xx.has_sampler_minmax; features->scalarBlockLayout = true; features->imagelessFramebuffer = true; features->uniformBufferStandardLayout = true;