radeonsi: don't do GFX-specific texture decompression for compute
authorMarek Olšák <marek.olsak@amd.com>
Tue, 3 Apr 2018 01:30:41 +0000 (21:30 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 13 Apr 2018 16:31:04 +0000 (12:31 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/drivers/radeonsi/si_blit.c

index 35506dd74b3dab83d0cb183f3046c5a2b9f64248..d6eab58b3a8be27f6cb8be46e6323eb632a358aa 100644 (file)
@@ -801,22 +801,22 @@ void si_decompress_textures(struct si_context *sctx, unsigned shader_mask)
                        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