llvmpipe/cs: respect render condition
authorDave Airlie <airlied@redhat.com>
Thu, 16 Jul 2020 19:22:18 +0000 (05:22 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 19 Jul 2020 05:07:26 +0000 (15:07 +1000)
Running complete CTS turned up a missing cond render.

Fixes KHR-GL45.compute_shader.conditional-dispatching

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5944>

src/gallium/drivers/llvmpipe/lp_state_cs.c

index 59757234a83307e4cc761e0105c7700dde63ae9a..dcdd9b3624086a8c1f21e699fc293469b26dcfe4 100644 (file)
@@ -43,6 +43,7 @@
 #include "lp_perf.h"
 #include "lp_screen.h"
 #include "lp_memory.h"
+#include "lp_query.h"
 #include "lp_cs_tpool.h"
 #include "frontend/sw_winsys.h"
 #include "nir/nir_to_tgsi_info.h"
@@ -1316,6 +1317,9 @@ static void llvmpipe_launch_grid(struct pipe_context *pipe,
    struct llvmpipe_screen *screen = llvmpipe_screen(pipe->screen);
    struct lp_cs_job_info job_info;
 
+   if (!llvmpipe_check_render_cond(llvmpipe))
+      return;
+
    memset(&job_info, 0, sizeof(job_info));
 
    llvmpipe_cs_update_derived(llvmpipe, info->input);