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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user