turnip: make sampler_minmax support configurable.
authorAmber <amber@igalia.com>
Mon, 10 Apr 2023 11:48:36 +0000 (13:48 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 13 Jul 2023 18:06:37 +0000 (18:06 +0000)
Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20991>

src/freedreno/common/freedreno_dev_info.h
src/freedreno/common/freedreno_devices.py
src/freedreno/vulkan/tu_device.cc

index 121a5e6..9debe89 100644 (file)
@@ -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;
index 1a8a916..6d1e8cc 100644 (file)
@@ -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,
index eebac32..f1c5ab2 100644 (file)
@@ -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;