Mesa (master): turnip: Be explicit about converting vk compare func to a6xx

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 4 06:25:01 UTC 2020


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

Author: Kristian H. Kristensen <hoegsberg at google.com>
Date:   Mon Feb  3 12:52:47 2020 -0800

turnip: Be explicit about converting vk compare func to a6xx

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3686>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3686>

---

 src/freedreno/vulkan/tu_device.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index b91df7c4411..df846dac63b 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -1928,6 +1928,12 @@ tu6_tex_filter(VkFilter filter, unsigned aniso)
    }
 }
 
+static inline enum adreno_compare_func
+tu6_compare_func(VkCompareOp op)
+{
+   return (enum adreno_compare_func) op;
+}
+
 static void
 tu_init_sampler(struct tu_device *device,
                 struct tu_sampler *sampler,
@@ -1952,7 +1958,8 @@ tu_init_sampler(struct tu_device *device,
       COND(pCreateInfo->unnormalizedCoordinates, A6XX_TEX_SAMP_1_UNNORM_COORDS) |
       A6XX_TEX_SAMP_1_MIN_LOD(pCreateInfo->minLod) |
       A6XX_TEX_SAMP_1_MAX_LOD(pCreateInfo->maxLod) |
-      COND(pCreateInfo->compareEnable, A6XX_TEX_SAMP_1_COMPARE_FUNC(pCreateInfo->compareOp));
+      COND(pCreateInfo->compareEnable,
+           A6XX_TEX_SAMP_1_COMPARE_FUNC(tu6_compare_func(pCreateInfo->compareOp)));
    sampler->state[2] = 0;
    sampler->state[3] = 0;
 



More information about the mesa-commit mailing list