summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-09-29 17:00:51 -0700
committerKenneth Graunke <[email protected]>2014-10-10 00:04:39 +0200
commit94841b6d5dac6dcb445a30f083ec6e9858ad2f7d (patch)
treead6c1e0274a71aa2afa6211ae8702cf5efae811a /src/mesa
parent7e67ea994c34a6ebbaeb6a097036702c7a96496f (diff)
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 <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index b04bd8fe5bf..bbbb76f3e4e 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -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);