diff options
author | Nicolai Hähnle <[email protected]> | 2016-03-15 22:01:39 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-03-21 15:34:23 -0500 |
commit | f61566b77a6164ad0830c4c7d363d91f6859a794 (patch) | |
tree | 81a052436b11654c9ca2db02b7a6c7ed6c597a24 /src | |
parent | e85cf35a6516c44e33663fcd9637c6b434bb63ee (diff) |
radeonsi: update shader image descriptor for invalidated buffer
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index a931ab24554..815b87bbd7e 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -1094,7 +1094,27 @@ static void si_invalidate_buffer(struct pipe_context *ctx, struct pipe_resource } } - /* Shader images - update TODO */ + /* Shader images */ + for (shader = 0; shader < SI_NUM_SHADERS; ++shader) { + struct si_images_info *images = &sctx->images[shader]; + unsigned mask = images->desc.enabled_mask; + + while (mask) { + unsigned i = u_bit_scan(&mask); + + if (images->views[i].resource == buf) { + si_desc_reset_buffer_offset( + ctx, images->desc.list + i * 8 + 4, + old_va, buf); + images->desc.list_dirty = true; + + radeon_add_to_buffer_list( + &sctx->b, &sctx->b.gfx, rbuffer, + RADEON_USAGE_READWRITE, + RADEON_PRIO_SAMPLER_BUFFER); + } + } + } } /* SHADER USER DATA */ |