[Mesa-dev] [PATCH 06/17] radeonsi: don't do GFX-specific texture decompression for compute
Marek Olšák
maraeo at gmail.com
Wed Apr 4 01:59:11 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_blit.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index d9d489825f8..45770b0d9bf 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -792,36 +792,36 @@ void si_decompress_textures(struct si_context *sctx, unsigned shader_mask)
if (sctx->images[i].needs_color_decompress_mask) {
si_decompress_image_color_textures(sctx, &sctx->images[i]);
}
}
if (shader_mask & u_bit_consecutive(0, SI_NUM_GRAPHICS_SHADERS)) {
if (sctx->uses_bindless_samplers)
si_decompress_resident_textures(sctx);
if (sctx->uses_bindless_images)
si_decompress_resident_images(sctx);
+
+ if (sctx->ps_uses_fbfetch) {
+ struct pipe_surface *cb0 = sctx->framebuffer.state.cbufs[0];
+ si_decompress_color_texture(sctx,
+ (struct r600_texture*)cb0->texture,
+ cb0->u.tex.first_layer,
+ cb0->u.tex.last_layer);
+ }
+
+ si_check_render_feedback(sctx);
} else if (shader_mask & (1 << PIPE_SHADER_COMPUTE)) {
if (sctx->cs_shader_state.program->uses_bindless_samplers)
si_decompress_resident_textures(sctx);
if (sctx->cs_shader_state.program->uses_bindless_images)
si_decompress_resident_images(sctx);
}
-
- if (sctx->ps_uses_fbfetch) {
- struct pipe_surface *cb0 = sctx->framebuffer.state.cbufs[0];
- si_decompress_color_texture(sctx,
- (struct r600_texture*)cb0->texture,
- cb0->u.tex.first_layer,
- cb0->u.tex.last_layer);
- }
-
- si_check_render_feedback(sctx);
}
/* Helper for decompressing a portion of a color or depth resource before
* blitting if any decompression is needed.
* The driver doesn't decompress resources automatically while u_blitter is
* rendering. */
static void si_decompress_subresource(struct pipe_context *ctx,
struct pipe_resource *tex,
unsigned planes, unsigned level,
unsigned first_layer, unsigned last_layer)
--
2.15.1
More information about the mesa-dev
mailing list