summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_query.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-06-14 19:48:57 +0200
committerRoland Scheidegger <[email protected]>2013-06-18 18:01:24 +0200
commit793e8e3d7ed816cc9a066245dde798afdcf8b581 (patch)
treeb71d5597d0d8669df8ed896b989bc519c82659d2 /src/gallium/drivers/nv30/nv30_query.c
parent443dc15cf77edcaa7804c4277f0cce5d7c1d6b25 (diff)
gallium: add condition parameter to render_condition
For conditional rendering this makes it possible to skip rendering if either the predicate is true or false, as supported by d3d10 (in fact previously it was sort of implied skip rendering if predicate is false for occlusion predicate, and true for so_overflow predicate). There's no cap bit for this as presumably all drivers could do it trivially (but this patch does not implement it for the drivers using true hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL functionality). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_query.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_query.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_query.c b/src/gallium/drivers/nv30/nv30_query.c
index 877408648e0..a0a4c67a3d4 100644
--- a/src/gallium/drivers/nv30/nv30_query.c
+++ b/src/gallium/drivers/nv30/nv30_query.c
@@ -232,7 +232,8 @@ nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
static void
nv40_query_render_condition(struct pipe_context *pipe,
- struct pipe_query *pq, uint mode)
+ struct pipe_query *pq,
+ boolean condition, uint mode)
{
struct nv30_context *nv30 = nv30_context(pipe);
struct nv30_query *q = nv30_query(pq);
@@ -240,6 +241,7 @@ nv40_query_render_condition(struct pipe_context *pipe,
nv30->render_cond_query = pq;
nv30->render_cond_mode = mode;
+ nv30->render_cond_cond = condition;
if (!pq) {
BEGIN_NV04(push, SUBC_3D(0x1e98), 1);