radv: fix prefetching of vertex shader and VBOs on SI
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 9 Apr 2018 12:38:16 +0000 (14:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 9 Apr 2018 14:14:12 +0000 (16:14 +0200)
Forgot one check... Too many mistakes for a simple change.

Fixes: f1d7c16e85 ("radv: fix prefetching compute shaders on CIK and older chips")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index e8a6d9be155bbb76d3eab6964a629b2494c00fbe..6cd798dbfc77e9132f818b178680dcc7aedaf86a 100644 (file)
@@ -3083,7 +3083,7 @@ radv_draw(struct radv_cmd_buffer *cmd_buffer,
                 */
                si_emit_cache_flush(cmd_buffer);
 
-               if (cmd_buffer->state.prefetch_L2_mask) {
+               if (has_prefetch && cmd_buffer->state.prefetch_L2_mask) {
                        /* Only prefetch the vertex shader and VBO descriptors
                         * in order to start the draw as soon as possible.
                         */