radv: Pass logical device to si_emit_graphics
authorJoshua Ashton <joshua@froggi.es>
Fri, 24 Apr 2020 10:13:51 +0000 (11:13 +0100)
committerMarge Bot <eric+marge@anholt.net>
Sat, 25 Apr 2020 00:32:20 +0000 (00:32 +0000)
We'll need this in order to retrieve the va of a bo for a future ext.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4728>

src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/si_cmd_buffer.c

index 75c72f5eb15715f749f495dbd130fe6ffe1fab42..99f64bbc00cab192ea6c97e86a9250bd5f0c6ae7 100644 (file)
@@ -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);
        }
 }
 
index b56772e6edb74fe06cf68e8125e2453064695da9..f3abc431e876804acbecbdfc966556a46b01fbbc 100644 (file)
@@ -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);
index a9083f33f7ba1dedf80ce8b88cb97b5ccbe6a267..03fa89b74c7167befa80cbef8b444b5013a32261 100644 (file)
@@ -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)