summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_blit.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2016-03-19 18:41:20 +0100
committerBas Nieuwenhuizen <[email protected]>2016-04-19 18:10:31 +0200
commit061ce9399a08f3edd4f5af16afd36bb14d58c864 (patch)
tree2e6af20ea43038a716bccae21298371d653ca732 /src/gallium/drivers/radeonsi/si_blit.c
parente56514f6316e48ee2231841d45695ff2b8f8b4f5 (diff)
radeonsi: split texture decompression for compute shaders
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 54da7a20203..7ca0e23b633 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -374,7 +374,8 @@ si_decompress_image_color_textures(struct si_context *sctx,
}
}
-void si_decompress_textures(struct si_context *sctx)
+static void si_decompress_textures(struct si_context *sctx, int shader_start,
+ int shader_end)
{
unsigned compressed_colortex_counter;
@@ -389,7 +390,7 @@ void si_decompress_textures(struct si_context *sctx)
}
/* Flush depth textures which need to be flushed. */
- for (int i = 0; i < SI_NUM_SHADERS; i++) {
+ for (int i = shader_start; i < shader_end; i++) {
if (sctx->samplers[i].depth_texture_mask) {
si_flush_depth_textures(sctx, &sctx->samplers[i]);
}
@@ -402,6 +403,14 @@ void si_decompress_textures(struct si_context *sctx)
}
}
+void si_decompress_graphics_textures(struct si_context *sctx) {
+ si_decompress_textures(sctx, 0, SI_NUM_GRAPHICS_SHADERS);
+}
+
+void si_decompress_compute_textures(struct si_context *sctx) {
+ si_decompress_textures(sctx, SI_NUM_GRAPHICS_SHADERS, SI_NUM_SHADERS);
+}
+
static void si_clear(struct pipe_context *ctx, unsigned buffers,
const union pipe_color_union *color,
double depth, unsigned stencil)