mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02: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> (cherry picked from commit1ad79cb84f)
This commit is contained in:
parent
f7ac8d19c1
commit
73c5434c25
2 changed files with 2 additions and 2 deletions
|
|
@ -1336,7 +1336,7 @@
|
|||
"description": "virgl: Fix stack overflow in virgl_bind_sampler_states",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "63c4c559cbce22102bdac695db1cb1bf229f68c3"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1182,7 +1182,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