Mesa (main): turnip: Get has_sample_locations from fd_dev_info

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 02:20:02 UTC 2021


Module: Mesa
Branch: main
Commit: f74d0bf05e47308daef1351661b45f77b36afea9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f74d0bf05e47308daef1351661b45f77b36afea9

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Jul  8 09:44:45 2021 -0700

turnip: Get has_sample_locations from fd_dev_info

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>

---

 src/freedreno/common/freedreno_dev_info.h | 2 ++
 src/freedreno/common/freedreno_devices.py | 1 +
 src/freedreno/vulkan/tu_device.c          | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h
index 88680f9eb11..b4e4cf7b6c6 100644
--- a/src/freedreno/common/freedreno_dev_info.h
+++ b/src/freedreno/common/freedreno_dev_info.h
@@ -87,6 +87,8 @@ struct fd_dev_info {
 
          bool has_tex_filter_cubic;
 
+         bool has_sample_locations;
+
          struct {
             uint32_t RB_UNKNOWN_8E04_blit;
             uint32_t PC_UNKNOWN_9805;
diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py
index afe2f8e021d..7e8bd6df89e 100644
--- a/src/freedreno/common/freedreno_devices.py
+++ b/src/freedreno/common/freedreno_devices.py
@@ -197,6 +197,7 @@ a6xx_gen3 = dict(
         tess_use_shared = True,
         storage_16bit = True,
         has_tex_filter_cubic = True,
+        has_sample_locations = True,
     )
 
 add_gpus([
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 09eecff8776..7651ca0e489 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -157,7 +157,7 @@ get_device_extensions(const struct tu_physical_device *device,
 #endif
       .EXT_external_memory_dma_buf = true,
       .EXT_image_drm_format_modifier = true,
-      .EXT_sample_locations = device->gpu_id == 650,
+      .EXT_sample_locations = device->info->a6xx.has_sample_locations,
       .EXT_sampler_filter_minmax = true,
       .EXT_transform_feedback = true,
       .EXT_4444_formats = true,



More information about the mesa-commit mailing list