radv: don't pass physical device to si_init_ fns.
authorDave Airlie <airlied@redhat.com>
Mon, 13 Feb 2017 03:35:37 +0000 (03:35 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 13 Feb 2017 20:02:06 +0000 (20:02 +0000)
This is just a trivial cleanup.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/si_cmd_buffer.c

index 25b1bd6a3e84c78b40ef78218c0361914dfe47e2..93bcd0a9218df1ace1723a7876bcb3ce8352b96e 100644 (file)
@@ -1626,7 +1626,7 @@ VkResult radv_BeginCommandBuffer(
                                RADV_CMD_FLAG_INV_SMEM_L1 |
                                RADV_CMD_FLUSH_AND_INV_FRAMEBUFFER |
                                RADV_CMD_FLAG_INV_GLOBAL_L2;
-                       si_init_config(cmd_buffer->device->physical_device, cmd_buffer);
+                       si_init_config(cmd_buffer);
                        radv_set_db_count_control(cmd_buffer);
                        si_emit_cache_flush(cmd_buffer);
                        break;
@@ -1636,7 +1636,7 @@ VkResult radv_BeginCommandBuffer(
                                RADV_CMD_FLAG_INV_VMEM_L1 |
                                RADV_CMD_FLAG_INV_SMEM_L1 |
                                RADV_CMD_FLAG_INV_GLOBAL_L2;
-                       si_init_compute(cmd_buffer->device->physical_device, cmd_buffer);
+                       si_init_compute(cmd_buffer);
                        si_emit_cache_flush(cmd_buffer);
                        break;
                case RADV_QUEUE_TRANSFER:
index 9a88ce0d64df6c68321ca3e48693cc74618c6798..6710f8a1be8f669112b5723a1002f80b90b1959c 100644 (file)
@@ -758,10 +758,8 @@ struct radv_image;
 
 bool radv_cmd_buffer_uses_mec(struct radv_cmd_buffer *cmd_buffer);
 
-void si_init_compute(struct radv_physical_device *physical_device,
-                    struct radv_cmd_buffer *cmd_buffer);
-void si_init_config(struct radv_physical_device *physical_device,
-                   struct radv_cmd_buffer *cmd_buffer);
+void si_init_compute(struct radv_cmd_buffer *cmd_buffer);
+void si_init_config(struct radv_cmd_buffer *cmd_buffer);
 void si_write_viewport(struct radeon_winsys_cs *cs, int first_vp,
                       int count, const VkViewport *viewports);
 void si_write_scissors(struct radeon_winsys_cs *cs, int first,
index b94c1f1079770e8c8d431a78e590c471b443c5c1..79a2455f921a758591b18894f699fa0ebe4b3871 100644 (file)
@@ -171,9 +171,9 @@ si_write_harvested_raster_configs(struct radv_physical_device *physical_device,
 }
 
 void
-si_init_compute(struct radv_physical_device *physical_device,
-                struct radv_cmd_buffer *cmd_buffer)
+si_init_compute(struct radv_cmd_buffer *cmd_buffer)
 {
+       struct radv_physical_device *physical_device = cmd_buffer->device->physical_device;
        struct radeon_winsys_cs *cs = cmd_buffer->cs;
        radeon_set_sh_reg_seq(cs, R_00B810_COMPUTE_START_X, 3);
        radeon_emit(cs, 0);
@@ -211,9 +211,9 @@ si_init_compute(struct radv_physical_device *physical_device,
 }
 
 
-void si_init_config(struct radv_physical_device *physical_device,
-                   struct radv_cmd_buffer *cmd_buffer)
+void si_init_config(struct radv_cmd_buffer *cmd_buffer)
 {
+       struct radv_physical_device *physical_device = cmd_buffer->device->physical_device;
        unsigned num_rb = MIN2(physical_device->rad_info.num_render_backends, 16);
        unsigned rb_mask = physical_device->rad_info.enabled_rb_mask;
        unsigned raster_config, raster_config_1;
@@ -420,7 +420,7 @@ void si_init_config(struct radv_physical_device *physical_device,
        if (physical_device->rad_info.family == CHIP_STONEY)
                radeon_set_context_reg(cs, R_028C40_PA_SC_SHADER_CONTROL, 0);
 
-       si_init_compute(physical_device, cmd_buffer);
+       si_init_compute(cmd_buffer);
 }
 
 static void