aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_bufmgr.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-07-01 11:33:35 -0700
committerKenneth Graunke <[email protected]>2017-07-11 13:26:46 -0700
commit20104f1926436e00171c8e64ca37fff9ffbd7096 (patch)
tree75cfa7f086f7f0715224e2dab8862d7eb0ebe89f /src/mesa/drivers/dri/i965/brw_bufmgr.h
parentf50aa21456d82c8cb6fbaa565835f1acc1720a5d (diff)
i965: Don't use PREAD for glGetBufferSubData().
Just map the buffer and memcpy. This will do a CPU mmap, which should be reasonably efficient, and doing this gives us full control over the domains and caching instead of leaving it to the kernel. This prevents regressions on Braswell in the next commit. Specifically GL45-CTS.shader_atomic_counters.basic-buffer-operations. Because async maps start skipping set-domain, the pread thought everything was nicely still in the CPU domain, and returned stale data. v2: Use _mesa_error_no_memory() if the map fails instead of crashing. Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_bufmgr.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index d388e5ad150..01a540f5315 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -222,9 +222,6 @@ static inline int brw_bo_unmap(struct brw_bo *bo) { return 0; }
/** Write data into an object. */
int brw_bo_subdata(struct brw_bo *bo, uint64_t offset,
uint64_t size, const void *data);
-/** Read data from an object. */
-int brw_bo_get_subdata(struct brw_bo *bo, uint64_t offset,
- uint64_t size, void *data);
/**
* Waits for rendering to an object by the GPU to have completed.
*