mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
radv: fix OOB access for inline push constants detected by UBSAN
src/amd/vulkan/radv_cmd_buffer.c:3232:75: runtime error: index 252 out of bounds for type 'uint8_t [128]' Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13951>
This commit is contained in:
parent
8e3fbe7cc8
commit
d18720897f
1 changed files with 1 additions and 1 deletions
|
|
@ -3229,7 +3229,7 @@ radv_flush_constants(struct radv_cmd_buffer *cmd_buffer, VkShaderStageFlags stag
|
|||
uint8_t base = shader->info.min_push_constant_used / 4;
|
||||
|
||||
radv_emit_inline_push_consts(cmd_buffer, pipeline, stage, AC_UD_INLINE_PUSH_CONSTANTS,
|
||||
(uint32_t *)&cmd_buffer->push_constants[base * 4]);
|
||||
(uint32_t *)cmd_buffer->push_constants + base);
|
||||
}
|
||||
|
||||
if (need_push_constants) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue