mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
radeonsi: fix an out-of-bounds access in si_create_vertex_state
Fixes: fb8f532ea1 - radeonsi: implement draw_vertex_state for lower display list overhead
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5484
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13309>
This commit is contained in:
parent
c85ce2531e
commit
b378d6c5db
1 changed files with 4 additions and 4 deletions
|
|
@ -5052,11 +5052,11 @@ si_create_vertex_state(struct pipe_screen *screen,
|
|||
/* Initialize the vertex element state in state->element.
|
||||
* Do it by creating a vertex element state object and copying it there.
|
||||
*/
|
||||
struct pipe_context ctx = {};
|
||||
ctx.screen = screen;
|
||||
struct si_vertex_elements *velems = si_create_vertex_elements(&ctx, num_elements, elements);
|
||||
struct si_context ctx = {};
|
||||
ctx.b.screen = screen;
|
||||
struct si_vertex_elements *velems = si_create_vertex_elements(&ctx.b, num_elements, elements);
|
||||
state->velems = *velems;
|
||||
si_delete_vertex_element(&ctx, velems);
|
||||
si_delete_vertex_element(&ctx.b, velems);
|
||||
|
||||
assert(!state->velems.instance_divisor_is_one);
|
||||
assert(!state->velems.instance_divisor_is_fetched);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue