[Mesa-dev] [PATCH] Disable bindless textures with radeonsi NIR until there is support for them.

Benedikt Schemmer ben at besd.de
Sun Apr 1 15:47:49 UTC 2018


From: Benedikt Schemmer <ben at 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


More information about the mesa-dev mailing list