summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-06-03 15:36:45 +0200
committerNicolai Hähnle <[email protected]>2016-06-07 15:18:05 +0200
commita29c4f9ebd83a815ed83c9fdcd19952ff8580132 (patch)
tree880a70a902303ba87ad57bd09ab9b4e7774ed04f /src/gallium/drivers
parent4e0fb727868103ef875d6bff40269192388d82f0 (diff)
radeonsi: pass shader stage to si_disable_shader_image
Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 23e98f7a561..f8748d6db1b 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -502,15 +502,19 @@ si_image_views_begin_new_cs(struct si_context *sctx, struct si_images_info *imag
}
static void
-si_disable_shader_image(struct si_images_info *images, unsigned slot)
+si_disable_shader_image(struct si_context *ctx, unsigned shader, unsigned slot)
{
+ struct si_images_info *images = &ctx->images[shader];
+
if (images->enabled_mask & (1u << slot)) {
+ struct si_descriptors *descs = &images->desc;
+
pipe_resource_reference(&images->views[slot].resource, NULL);
images->compressed_colortex_mask &= ~(1 << slot);
- memcpy(images->desc.list + slot*8, null_image_descriptor, 8*4);
+ memcpy(descs->list + slot*8, null_image_descriptor, 8*4);
images->enabled_mask &= ~(1u << slot);
- images->desc.dirty_mask |= 1u << slot;
+ descs->dirty_mask |= 1u << slot;
}
}
@@ -541,7 +545,7 @@ static void si_set_shader_image(struct si_context *ctx,
struct r600_resource *res;
if (!view || !view->resource) {
- si_disable_shader_image(images, slot);
+ si_disable_shader_image(ctx, shader, slot);
return;
}