From fa225de793fb6c24e3d2fedb34a990a8beb72c40 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 3 Dec 2025 09:55:05 +0100 Subject: [PATCH] radv: constify radv_gfx12_emit_buffered_regs() Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 6 +++--- src/amd/vulkan/radv_cs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 43a94305cd9..143275f40ef 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -12807,7 +12807,7 @@ radv_bind_graphics_shaders(struct radv_cmd_buffer *cmd_buffer) ALWAYS_INLINE static bool radv_before_draw(struct radv_cmd_buffer *cmd_buffer, const struct radv_draw_info *info, uint32_t drawCount, bool dgc) { - struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); + const struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); const struct radv_physical_device *pdev = radv_device_physical(device); const bool has_prefetch = pdev->info.gfx_level >= GFX7; struct radv_cmd_stream *cs = cmd_buffer->cs; @@ -12892,7 +12892,7 @@ ALWAYS_INLINE static bool radv_before_taskmesh_draw(struct radv_cmd_buffer *cmd_buffer, const struct radv_draw_info *info, uint32_t drawCount, bool dgc) { - struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); + const struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); const struct radv_physical_device *pdev = radv_device_physical(device); struct radv_cmd_stream *cs = cmd_buffer->cs; @@ -13817,7 +13817,7 @@ static void radv_before_dispatch(struct radv_cmd_buffer *cmd_buffer, struct radv_compute_pipeline *pipeline, VkPipelineBindPoint bind_point) { - struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); + const struct radv_device *device = radv_cmd_buffer_device(cmd_buffer); const struct radv_physical_device *pdev = radv_device_physical(device); const bool pipeline_is_dirty = pipeline != cmd_buffer->state.emitted_compute_pipeline; struct radv_shader *compute_shader = bind_point == VK_PIPELINE_BIND_POINT_COMPUTE diff --git a/src/amd/vulkan/radv_cs.h b/src/amd/vulkan/radv_cs.h index 656e62c9e5b..dea6d464654 100644 --- a/src/amd/vulkan/radv_cs.h +++ b/src/amd/vulkan/radv_cs.h @@ -294,7 +294,7 @@ radeon_check_space(struct radeon_winsys *ws, struct ac_cmdbuf *cs, unsigned need gfx11_opt_push_reg2(reg, reg_enum, v1, v2, SI_CONTEXT, __cs_context_regs, __cs_context_reg_count) ALWAYS_INLINE static void -radv_gfx12_emit_buffered_regs(struct radv_device *device, struct radv_cmd_stream *cs) +radv_gfx12_emit_buffered_regs(const struct radv_device *device, struct radv_cmd_stream *cs) { const uint32_t reg_count = cs->buffered_sh_regs.num;