From 0b44582394664087cc8d558f6c928f14e15f4616 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 24 Apr 2020 11:13:51 +0100 Subject: [PATCH] radv: Pass logical device to si_emit_graphics We'll need this in order to retrieve the va of a bo for a future ext. Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_device.c | 3 +-- src/amd/vulkan/radv_private.h | 2 +- src/amd/vulkan/si_cmd_buffer.c | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 75c72f5eb15..99f64bbc00c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3702,8 +3702,7 @@ radv_init_graphics_state(struct radeon_cmdbuf *cs, struct radv_queue *queue) radv_cs_add_buffer(device->ws, cs, device->gfx_init); } else { - struct radv_physical_device *physical_device = device->physical_device; - si_emit_graphics(physical_device, cs); + si_emit_graphics(device, cs); } } diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index b56772e6edb..f3abc431e87 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1401,7 +1401,7 @@ struct radv_image_view; bool radv_cmd_buffer_uses_mec(struct radv_cmd_buffer *cmd_buffer); -void si_emit_graphics(struct radv_physical_device *physical_device, +void si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs); void si_emit_compute(struct radv_physical_device *physical_device, struct radeon_cmdbuf *cs); diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index a9083f33f7b..03fa89b74c7 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -155,9 +155,11 @@ si_set_raster_config(struct radv_physical_device *physical_device, } void -si_emit_graphics(struct radv_physical_device *physical_device, +si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs) { + struct radv_physical_device *physical_device = device->physical_device; + bool has_clear_state = physical_device->rad_info.has_clear_state; int i; @@ -500,7 +502,7 @@ cik_create_gfx_config(struct radv_device *device) if (!cs) return; - si_emit_graphics(device->physical_device, cs); + si_emit_graphics(device, cs); while (cs->cdw & 7) { if (device->physical_device->rad_info.gfx_ib_pad_with_type2) -- 2.30.2