mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
i965: Fix register write checks.
When mapping the buffer a second time, we need to use the new pointer,
not the one from the previous mapping. Otherwise, we will most likely
crash.
Apparently, we've just been getting lucky and getting the same
bo->virtual pointer in both cases. libdrm probably has a hand in that.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 94841b6d5d)
This commit is contained in:
parent
5e6ee119c0
commit
13a4fd2430
1 changed files with 2 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ can_do_pipelined_register_writes(struct brw_context *brw)
|
|||
|
||||
/* Check whether the value got written. */
|
||||
drm_intel_bo_map(brw->batch.workaround_bo, false);
|
||||
data = brw->batch.workaround_bo->virtual;
|
||||
bool success = data[offset] == expected_value;
|
||||
drm_intel_bo_unmap(brw->batch.workaround_bo);
|
||||
|
||||
|
|
@ -145,6 +146,7 @@ can_write_oacontrol(struct brw_context *brw)
|
|||
|
||||
/* Check whether the value got written. */
|
||||
drm_intel_bo_map(brw->batch.workaround_bo, false);
|
||||
data = brw->batch.workaround_bo->virtual;
|
||||
bool success = data[offset] == expected_value;
|
||||
drm_intel_bo_unmap(brw->batch.workaround_bo);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue