mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
virgl: Fix stack overflow in virgl_bind_sampler_states
Triggered on hosts with more than 32 samplers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9207
Fixes: 63c4c559 ("virgl: obtain supported number of shader sampler views from host")
Signed-off-by: Tim Pambor <tp@osasysteme.de>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23678>
This commit is contained in:
parent
0e726c63ff
commit
1ad79cb84f
1 changed files with 1 additions and 1 deletions
|
|
@ -1181,7 +1181,7 @@ static void virgl_bind_sampler_states(struct pipe_context *ctx,
|
|||
void **samplers)
|
||||
{
|
||||
struct virgl_context *vctx = virgl_context(ctx);
|
||||
uint32_t handles[32];
|
||||
uint32_t handles[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
||||
int i;
|
||||
for (i = 0; i < num_samplers; i++) {
|
||||
handles[i] = (unsigned long)(samplers[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue