From: Benedikt Schemmer <b...@besd.de>
Date: Sun, 1 Apr 2018 13:18:02 +0200
Subject: [PATCH] Disable bindless textures with radeonsi NIR until there
is support for them.

- Allows to build and use a debug build of mesa with
 shader-db (crashes otherwise with affected shaders)

- Dirt Rally doesnt care about bindless, but Warhammer 40k Dawn 3 does
and crashes with nir when ARB_bindless_texture is reported

---
 src/gallium/drivers/radeonsi/si_get.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_get.c
b/src/gallium/drivers/radeonsi/si_get.c
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -176,7 +176,6 @@ static int si_get_param(struct pipe_screen *pscreen,
enum pipe_cap param)
        case PIPE_CAP_DOUBLES:
        case PIPE_CAP_TGSI_TEX_TXF_LZ:
        case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
-       case PIPE_CAP_BINDLESS_TEXTURE:
        case PIPE_CAP_QUERY_TIMESTAMP:
        case PIPE_CAP_QUERY_TIME_ELAPSED:
        case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
@@ -257,6 +256,11 @@ static int si_get_param(struct pipe_screen
*pscreen, enum pipe_cap param)
                        return 1;
                return 0;

+       case PIPE_CAP_BINDLESS_TEXTURE:
+               if (sscreen->debug_flags & DBG(NIR))
+                       return 0;
+               return 1;
+
        /* Unsupported features. */
        case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
        case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
-- 
2.14.1
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to