diff options
author | Roland Scheidegger <[email protected]> | 2013-06-19 23:25:39 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-19 23:47:35 +0200 |
commit | cdf89d0b5c3fccefe573d5adf731dd8fb900b74e (patch) | |
tree | af4babc7d296b84ecee7ec7d248ab24691e1ca64 /src/gallium/drivers/nvc0/nvc0_query.c | |
parent | a0a40805ddeb77d3062780418efc26605d2a5b64 (diff) |
gallium: fix PIPE_QUERY_TIMESTAMP_DISJOINT
The semantics didn't really make sense, not really matching neither d3d9
(though the docs are all broken there) nor d3d10. So make it match d3d10
semantics, which actually gives meaning to the "disjoint" part.
Drivers are fixed up in a very primitive way, I have no idea what could
actually cause the counter to become unreliable so just always return
FALSE for the disjoint part.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_query.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_query.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c index 8e584c900a6..75c515ac8da 100644 --- a/src/gallium/drivers/nvc0/nvc0_query.c +++ b/src/gallium/drivers/nvc0/nvc0_query.c @@ -285,7 +285,6 @@ nvc0_query_begin(struct pipe_context *pipe, struct pipe_query *pq) case PIPE_QUERY_SO_OVERFLOW_PREDICATE: nvc0_query_get(push, q, 0x10, 0x03005002 | (q->index << 5)); break; - case PIPE_QUERY_TIMESTAMP_DISJOINT: case PIPE_QUERY_TIME_ELAPSED: nvc0_query_get(push, q, 0x10, 0x00005002); break; @@ -360,7 +359,6 @@ nvc0_query_end(struct pipe_context *pipe, struct pipe_query *pq) nvc0_query_get(push, q, 0x20, 0x00005002); break; case PIPE_QUERY_TIMESTAMP: - case PIPE_QUERY_TIMESTAMP_DISJOINT: case PIPE_QUERY_TIME_ELAPSED: nvc0_query_get(push, q, 0, 0x00005002); break; @@ -476,9 +474,9 @@ nvc0_query_result(struct pipe_context *pipe, struct pipe_query *pq, case PIPE_QUERY_TIMESTAMP: res64[0] = data64[1]; break; - case PIPE_QUERY_TIMESTAMP_DISJOINT: /* u32 sequence, u32 0, u64 time */ + case PIPE_QUERY_TIMESTAMP_DISJOINT: res64[0] = 1000000000; - res8[8] = (data64[1] == data64[3]) ? FALSE : TRUE; + res8[8] = FALSE; break; case PIPE_QUERY_TIME_ELAPSED: res64[0] = data64[1] - data64[3]; |