From 455c79b24f91fbceaed57d49718fa198e2a6b0ff Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 16 Nov 2016 00:47:35 +0100 Subject: tgsi/scan: record load/store/atomic image usage Reviewed-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 212a9bee800..f84eefc3ddc 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3328,10 +3328,12 @@ image_fetch_rsrc( if (!image->Register.Indirect) { const struct tgsi_shader_info *info = bld_base->info; + unsigned images_writemask = info->images_store | + info->images_atomic; index = LLVMConstInt(ctx->i32, image->Register.Index, 0); - if (info->images_writemask & (1 << image->Register.Index) && + if (images_writemask & (1 << image->Register.Index) && target != TGSI_TEXTURE_BUFFER) dcc_off = true; } else { -- cgit v1.2.3