aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2017-02-11 18:37:41 -0500
committerEmil Velikov <[email protected]>2017-02-23 19:34:58 +0000
commit8d7110e55273ea21fdd36acc3b9b6f3f133a3ef6 (patch)
treefcd494488e2869b573aae0fa4c604d4de69e74cf /src
parent138be7ed9f3293189d4ff868a80be052b389908c (diff)
nvc0: set the render condition in the compute object
Fixes GL45-CTS.compute_shader.conditional-dispatching Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 48f04862c1d74844db9534b32ef73e5a2bc0ae74)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_query.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
index 68e0a63cce1..24aa5ed2be4 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query.c
@@ -142,15 +142,17 @@ nvc0_render_condition(struct pipe_context *pipe,
nvc0->cond_mode = mode;
if (!pq) {
- PUSH_SPACE(push, 1);
+ PUSH_SPACE(push, 2);
IMMED_NVC0(push, NVC0_3D(COND_MODE), cond);
+ if (nvc0->screen->compute)
+ IMMED_NVC0(push, NVC0_CP(COND_MODE), cond);
return;
}
if (wait)
nvc0_hw_query_fifo_wait(nvc0, q);
- PUSH_SPACE(push, 7);
+ PUSH_SPACE(push, 10);
PUSH_REFN (push, hq->bo, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
BEGIN_NVC0(push, NVC0_3D(COND_ADDRESS_HIGH), 3);
PUSH_DATAh(push, hq->bo->offset + hq->offset);
@@ -159,6 +161,12 @@ nvc0_render_condition(struct pipe_context *pipe,
BEGIN_NVC0(push, NVC0_2D(COND_ADDRESS_HIGH), 2);
PUSH_DATAh(push, hq->bo->offset + hq->offset);
PUSH_DATA (push, hq->bo->offset + hq->offset);
+ if (nvc0->screen->compute) {
+ BEGIN_NVC0(push, NVC0_CP(COND_ADDRESS_HIGH), 3);
+ PUSH_DATAh(push, hq->bo->offset + hq->offset);
+ PUSH_DATA (push, hq->bo->offset + hq->offset);
+ PUSH_DATA (push, cond);
+ }
}
int