mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 14:18:07 +02:00
anv/rt: avoid out of bound access by clamping global id
Signed-off-by: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: cff9d82c66 ("anv/rt: rewrite encode.comp for better performance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38636>
This commit is contained in:
parent
b1e74a1bb1
commit
406e6e094a
1 changed files with 2 additions and 2 deletions
|
|
@ -516,8 +516,8 @@ main()
|
|||
((gl_GlobalInvocationID.x & 0xF0) >> 4)
|
||||
: gl_GlobalInvocationID.x;
|
||||
uint32_t global_id =
|
||||
DEREF(args.header).ir_internal_node_count - 1 - global_id_hash;
|
||||
|
||||
DEREF(args.header).ir_internal_node_count - 1 -
|
||||
min(global_id_hash, DEREF(args.header).ir_internal_node_count - 1);
|
||||
|
||||
uint32_t intermediate_leaf_node_size;
|
||||
switch (args.geometry_type) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue