r600/shader: add flag to denote if shader uses images
authorDave Airlie <airlied@redhat.com>
Tue, 14 Nov 2017 23:54:24 +0000 (09:54 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 17 Nov 2017 01:31:40 +0000 (11:31 +1000)
Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_shader.h

index b1a164e594ddc682b9b56cf642388fff1c3410a3..919685ca6a27a4c72b49a062e2233ba1d72ca41e 100644 (file)
@@ -2971,6 +2971,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
        shader->uses_atomics = ctx.info.file_mask[TGSI_FILE_HW_ATOMIC];
        shader->nsys_inputs = 0;
 
+       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;
index 40719d9be5e9a185b53a0a86e54db0c0273dd75c..c6efbb9852f67fc5e24c3b694ebfd795d71c53bf 100644 (file)
@@ -116,6 +116,7 @@ struct r600_shader {
 
        boolean                 uses_doubles;
        boolean                 uses_atomics;
+       boolean                 uses_images;
        uint8_t                 atomic_base;
 };