diff options
author | Ilia Mirkin <[email protected]> | 2019-02-04 22:57:06 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2019-02-06 19:35:57 -0500 |
commit | e00799d3dc0595dc3998dbf199ceec8b1eece966 (patch) | |
tree | e0a44996e5925d9a953606d51e4007fccc6aad51 /src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | |
parent | 162352e6711b3ceab114686f7a3248074339e7f7 (diff) |
nv50,nvc0: use condition for occlusion queries when already complete
For the NO_WAIT variants, we would jump into the ALWAYS case for both
nested and inverted occlusion queries. However if the query had
previously completed, the application could reasonably expect that the
render condition would follow that result.
To resolve this, we remove the nesting distinction which unnecessarily
created an imbalance between the regular and inverted cases (since
there's no "zero" condition mode). We also use the proper comparison if
we know that the query has completed (which could happen as a result of
an earlier get_query_result call).
Fixes KHR-GL45.conditional_render_inverted.functional
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: 19.0 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_query_hw.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c index ac3e409b2d5..4e74c462235 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw.c @@ -29,11 +29,6 @@ #include "nv50/nv50_query_hw_sm.h" #include "nv_object.xml.h" -#define NV50_HW_QUERY_STATE_READY 0 -#define NV50_HW_QUERY_STATE_ACTIVE 1 -#define NV50_HW_QUERY_STATE_ENDED 2 -#define NV50_HW_QUERY_STATE_FLUSHED 3 - /* XXX: Nested queries, and simultaneous queries on multiple gallium contexts * (since we use only a single GPU channel per screen) will not work properly. * @@ -158,8 +153,7 @@ nv50_hw_begin_query(struct nv50_context *nv50, struct nv50_query *q) case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_OCCLUSION_PREDICATE: case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: - hq->nesting = nv50->screen->num_occlusion_queries_active++; - if (hq->nesting) { + if (nv50->screen->num_occlusion_queries_active++) { nv50_hw_query_get(push, q, 0x10, 0x0100f002); } else { PUSH_SPACE(push, 4); |