[Mesa-dev] [PATCH 17/30] r600/shader: add a flag to denote the shader uses images.
Dave Airlie
airlied at gmail.com
Thu Mar 31 07:03:46 UTC 2016
From: Dave Airlie <airlied at redhat.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/r600/r600_shader.c | 2 +-
src/gallium/drivers/r600/r600_shader.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 77658f5..921552e 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2946,7 +2946,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
shader->indirect_files = ctx.info.indirect_files;
shader->uses_doubles = ctx.info.uses_doubles;
-
+ shader->uses_images = ctx.info.file_count[TGSI_FILE_IMAGE] > 0;
indirect_gprs = ctx.info.indirect_files & ~((1 << TGSI_FILE_CONSTANT) | (1 << TGSI_FILE_SAMPLER));
tgsi_parse_init(&ctx.parse, tokens);
ctx.type = ctx.info.processor;
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h
index cfdb020..3086e8e 100644
--- a/src/gallium/drivers/r600/r600_shader.h
+++ b/src/gallium/drivers/r600/r600_shader.h
@@ -104,6 +104,7 @@ struct r600_shader {
struct r600_shader_array * arrays;
boolean uses_doubles;
+ boolean uses_images;
};
union r600_shader_key {
--
2.5.0
More information about the mesa-dev
mailing list