if (result != VK_SUCCESS)
goto fail_surface_aux_map_pool;
+ device->workaround_address = (struct anv_address) {
+ .bo = device->workaround_bo,
+ };
+
result = anv_device_init_trivial_batch(device);
if (result != VK_SUCCESS)
goto fail_workaround_bo;
const struct nir_shader *nir,
unsigned char sha1_key[20]);
+struct anv_address {
+ struct anv_bo *bo;
+ uint32_t offset;
+};
+
struct anv_device {
struct vk_device vk;
* For that, we use the high bytes (>= 1024) of the workaround BO.
*/
struct anv_bo * workaround_bo;
+ struct anv_address workaround_address;
+
struct anv_bo * trivial_batch_bo;
struct anv_bo * hiz_clear_bo;
struct anv_state null_surface_state;
struct anv_reloc_list relocs;
};
-struct anv_address {
- struct anv_bo *bo;
- uint32_t offset;
-};
-
struct anv_batch {
const VkAllocationCallbacks * alloc;
struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
return (struct blorp_address) {
- .buffer = cmd_buffer->device->workaround_bo,
+ .buffer = cmd_buffer->device->workaround_address.bo,
+ .offset = cmd_buffer->device->workaround_address.offset,
};
}
*/
if (GEN_GEN == 9 && pipe.VFCacheInvalidationEnable) {
pipe.PostSyncOperation = WriteImmediateData;
- pipe.Address =
- (struct anv_address) { cmd_buffer->device->workaround_bo, 0 };
+ pipe.Address = cmd_buffer->device->workaround_address;
}
}
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
pc.DepthStallEnable = true;
pc.PostSyncOperation = WriteImmediateData;
- pc.Address =
- (struct anv_address) { cmd_buffer->device->workaround_bo, 0 };
+ pc.Address = cmd_buffer->device->workaround_address;
}
}
#endif
*/
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
pc.PostSyncOperation = WriteImmediateData;
- pc.Address =
- (struct anv_address) { cmd_buffer->device->workaround_bo, 0 };
+ pc.Address = cmd_buffer->device->workaround_address;
}
}
cmd_buffer->state.hiz_enabled = isl_aux_usage_has_hiz(info.hiz_usage);
anv_batch_emit(batch, GEN7_PIPE_CONTROL, pc) {
pc.DepthStallEnable = true;
pc.PostSyncOperation = WriteImmediateData;
- pc.Address = (struct anv_address) { device->workaround_bo, 0 };
+ pc.Address = device->workaround_address;
}
#endif