[Mesa-dev] [PATCH 1/9] r600/images: set offset for compute shaders with number of declared samplers

Dave Airlie airlied at gmail.com
Mon Feb 5 04:29:00 UTC 2018


From: Dave Airlie <airlied at redhat.com>

for frag shaders we get a value in the key, I expect I need
to make compute work better
---
 src/gallium/drivers/r600/r600_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 37c90b8b7d..8c4460a5d5 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -3247,7 +3247,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
 		break;
 	case PIPE_SHADER_COMPUTE:
 		shader->rat_base = 0;
-		shader->image_size_const_offset = 0;
+		shader->image_size_const_offset = ctx.info.file_count[TGSI_FILE_SAMPLER];
 		break;
 	default:
 		break;
-- 
2.14.3



More information about the mesa-dev mailing list