radv: fix pipeline statistics end query on compute queue
authorDave Airlie <airlied@redhat.com>
Thu, 28 Dec 2017 06:31:48 +0000 (16:31 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 28 Dec 2017 09:31:01 +0000 (19:31 +1000)
It's legal to a pipeline stat query on a compute queue,
but we'd emit the wrong packet here. This should fix it to emit
the correct packet.

Noticed while inspecting the mpv hang.

Fixes: ad61eac250 (radv: factor out eop event writing code. (v2))
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_query.c

index 5dc88af8f84ac6393dc41d88b80dcc2bed658730..ace745e4e6e8d24db56bd187038c83efc1310d02 100644 (file)
@@ -1156,7 +1156,7 @@ void radv_CmdEndQuery(
                si_cs_emit_write_event_eop(cs,
                                           false,
                                           cmd_buffer->device->physical_device->rad_info.chip_class,
-                                          false,
+                                          radv_cmd_buffer_uses_mec(cmd_buffer),
                                           V_028A90_BOTTOM_OF_PIPE_TS, 0,
                                           1, avail_va, 0, 1);
                break;