mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 22:18:13 +02:00
zink: fix ubo array sizing in ntv
there are only 2 ubos that can be emitted, except the emitted ubos
can start at an offset based on the first-used ubo, which means this
has to support the full range of ubo indices
fixes oob access in game Beyond All Reason
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
(cherry picked from commit 9803174942)
This commit is contained in:
parent
f2fa64def1
commit
b94aca6dbf
2 changed files with 3 additions and 3 deletions
|
|
@ -76,7 +76,7 @@
|
|||
"description": "zink: fix ubo array sizing in ntv",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ struct ntv_context {
|
|||
gl_shader_stage stage;
|
||||
const struct zink_shader_info *sinfo;
|
||||
|
||||
SpvId ubos[2][5]; //8, 16, 32, unused, 64
|
||||
nir_variable *ubo_vars[2];
|
||||
SpvId ubos[PIPE_MAX_CONSTANT_BUFFERS][5]; //8, 16, 32, unused, 64
|
||||
nir_variable *ubo_vars[PIPE_MAX_CONSTANT_BUFFERS];
|
||||
|
||||
SpvId ssbos[5]; //8, 16, 32, unused, 64
|
||||
nir_variable *ssbo_vars;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue