i965: fix decode_get_bo
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Wed, 17 Mar 2021 19:27:40 +0000 (20:27 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 22 Mar 2021 08:36:55 +0000 (08:36 +0000)
Similar fix to the iris one.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707>

src/mesa/drivers/dri/i965/brw_batch.c

index 930f8de..2c6e80e 100644 (file)
@@ -93,9 +93,9 @@ decode_get_bo(void *v_brw, bool ppgtt, uint64_t address)
 
       if (address >= bo_address && address < bo_address + bo->size) {
          return (struct intel_batch_decode_bo) {
-            .addr = address,
+            .addr = bo_address,
             .size = bo->size,
-            .map = brw_bo_map(brw, bo, MAP_READ) + (address - bo_address),
+            .map = brw_bo_map(brw, bo, MAP_READ),
          };
       }
    }