mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
i965: Fix occlusion query on sandybridge
Clear target query buffer fixed occlusion query on sandybridge.
https://bugs.freedesktop.org/show_bug.cgi?id=32167
(cherry picked from commit 689aca7822)
This commit is contained in:
parent
7e3c1f221a
commit
96685a662f
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue