execbuf.alloc_scope = submit->alloc_scope;
execbuf.perf_query_pass = submit->perf_query_pass;
- VkResult result;
+ /* Always add the workaround BO as it includes a driver identifier for the
+ * error_state.
+ */
+ VkResult result =
+ anv_execbuf_add_bo(device, &execbuf, device->workaround_bo, NULL, 0);
+ if (result != VK_SUCCESS)
+ goto error;
for (uint32_t i = 0; i < submit->fence_bo_count; i++) {
int signaled;
goto fail_binding_table_pool;
}
- result = anv_device_alloc_bo(device, 4096, 0 /* flags */,
+ result = anv_device_alloc_bo(device, 4096,
+ ANV_BO_ALLOC_CAPTURE | ANV_BO_ALLOC_MAPPED /* flags */,
0 /* explicit_address */,
&device->workaround_bo);
if (result != VK_SUCCESS)
device->workaround_address = (struct anv_address) {
.bo = device->workaround_bo,
+ .offset = align_u32(
+ intel_debug_write_identifiers(device->workaround_bo->map,
+ device->workaround_bo->size,
+ "Anv") + 8, 8),
};
+ if (!device->info.has_llc) {
+ gen_clflush_range(device->workaround_bo->map,
+ device->workaround_address.offset);
+ }
+
result = anv_device_init_trivial_batch(device);
if (result != VK_SUCCESS)
goto fail_workaround_bo;
if (bits & ANV_PIPE_END_OF_PIPE_SYNC_BIT) {
pipe.CommandStreamerStallEnable = true;
pipe.PostSyncOperation = WriteImmediateData;
- pipe.Address = (struct anv_address) {
- .bo = cmd_buffer->device->workaround_bo,
- .offset = 0
- };
+ pipe.Address = cmd_buffer->device->workaround_address;
}
/*
*/
anv_batch_emit(&cmd_buffer->batch, GENX(MI_LOAD_REGISTER_MEM), lrm) {
lrm.RegisterAddress = 0x243C; /* GEN7_3DPRIM_START_INSTANCE */
- lrm.MemoryAddress = (struct anv_address) {
- .bo = cmd_buffer->device->workaround_bo,
- .offset = 0
- };
+ lrm.MemoryAddress = cmd_buffer->device->workaround_address;
}
}