summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-01-15 11:35:55 +0200
committerTopi Pohjolainen <[email protected]>2017-06-19 22:57:57 +0300
commit67b44a8423b9bf616387309761831caf3aa629c8 (patch)
treed911a56f939d2ec46c0bc8998c521abc08a653f9
parent1a43d774b613d0b00e26b28cc752d944ce8049aa (diff)
i965/miptree: Drop BO_ALLOC_FOR_RENDER in intel_miptree_alloc_mcs()
because buffers get unconditionally initialised by cpu writing. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index c08f14314bc..42fbed34b51 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1678,7 +1678,12 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
assert(isl_surf_get_mcs_surf(&brw->isl_dev, &temp_main_surf,
&temp_mcs_surf));
- const uint32_t alloc_flags = BO_ALLOC_FOR_RENDER;
+ /* Buffer needs to be initialised requiring the buffer to be immediately
+ * mapped to cpu space for writing. Therefore do not use the gpu access
+ * flag which can cause an unnecessary delay if the backing pages happened
+ * to be just used by the GPU.
+ */
+ const uint32_t alloc_flags = 0;
mt->mcs_buf = intel_alloc_aux_buffer(brw, "mcs-miptree",
&temp_mcs_surf, alloc_flags, mt);
if (!mt->mcs_buf) {