projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59fa860
)
i965: Fix occlusion query on sandybridge
author
Zhenyu Wang
<zhenyuw@linux.intel.com>
Tue, 28 Dec 2010 03:03:45 +0000
(11:03 +0800)
committer
Zhenyu Wang
<zhenyuw@linux.intel.com>
Tue, 28 Dec 2010 03:11:40 +0000
(11:11 +0800)
Clear target query buffer fixed occlusion query on sandybridge.
https://bugs.freedesktop.org/show_bug.cgi?id=32167
src/mesa/drivers/dri/i965/brw_queryobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_queryobj.c
b/src/mesa/drivers/dri/i965/brw_queryobj.c
index f28f28663ea728cce8ce33c2abfdf482ea1ed20f..656aad630a19024d84ef99a4b5197b986c6ea683 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/
src/mesa/drivers/dri/i965/brw_queryobj.c
@@
-232,6
+232,12
@@
brw_prepare_query_begin(struct brw_context *brw)
brw->query.bo = NULL;
brw->query.bo = drm_intel_bo_alloc(intel->bufmgr, "query", 4096, 1);
+
+ /* clear target buffer */
+ drm_intel_bo_map(brw->query.bo, GL_TRUE);
+ memset((char *)brw->query.bo->virtual, 0, 4096);
+ drm_intel_bo_unmap(brw->query.bo);
+
brw->query.index = 0;
}