projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd4856
)
r300g: implement PIPE_QUERY_OCCLUSION_PREDICATE
author
Marek Olšák
<maraeo@gmail.com>
Thu, 10 Nov 2011 20:18:10 +0000
(21:18 +0100)
committer
Marek Olšák
<maraeo@gmail.com>
Thu, 10 Nov 2011 21:53:54 +0000
(22:53 +0100)
src/gallium/drivers/r300/r300_query.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/r300/r300_query.c
b/src/gallium/drivers/r300/r300_query.c
index 55ec66deb722af6811f1d4bb92790001901a9dd6..c166717176608317c11cd10982c0baa814fa99f9 100644
(file)
--- a/
src/gallium/drivers/r300/r300_query.c
+++ b/
src/gallium/drivers/r300/r300_query.c
@@
-36,7
+36,8
@@
static struct pipe_query *r300_create_query(struct pipe_context *pipe,
struct r300_screen *r300screen = r300->screen;
struct r300_query *q;
- if (query_type != PIPE_QUERY_OCCLUSION_COUNTER) {
+ if (query_type != PIPE_QUERY_OCCLUSION_COUNTER &&
+ query_type != PIPE_QUERY_OCCLUSION_PREDICATE) {
return NULL;
}
@@
-139,6
+140,9
@@
static boolean r300_get_query_result(struct pipe_context* pipe,
r300->rws->buffer_unmap(q->buf);
+ if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE) {
+ temp = temp != 0;
+ }
*((uint64_t*)vresult) = temp;
return TRUE;
}