summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-11-28 08:59:07 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2017-12-01 17:08:55 +0000
commit09f6bd5ef27c1b16b1468441b070b60c2d57523d (patch)
treeaf90be1d42028f2af3d3eeaa0f558c4ffe0c2f5f
parenta49b70d2ec36f6a420801c41704d9b4d58b57c17 (diff)
downloadmesa-09f6bd5ef27c1b16b1468441b070b60c2d57523d.tar.gz
i965: Preserve EXEC_OBJECT_CAPTURE when growing the BO.
The original state buffer was marked with EXEC_OBJECT_CAPTURE. When growing it, we want to preserve that flag so we continue to capture it in GPU hang reports. Fixes: 2dfc119f22f257082ab0 "i965: Grow the batch/state buffers if we need space and can't flush." Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 52d32917e1f3f70abcbcff5508f7423e94626b41)
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index d9aaec54721..0d8bd394c6e 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -313,9 +313,12 @@ grow_buffer(struct brw_context *brw,
* This guarantees that our relocations continue to work: values we've
* already written into the buffer, values we're going to write into the
* buffer, and the validation/relocation lists all will match.
+ *
+ * Also preserve kflags for EXEC_OBJECT_CAPTURE.
*/
new_bo->gtt_offset = old_bo->gtt_offset;
new_bo->index = old_bo->index;
+ new_bo->kflags = old_bo->kflags;
/* Batch/state buffers are per-context, and if we've run out of space,
* we must have actually used them before, so...they will be in the list.