diff --git a/src/intel/vulkan/bvh/encode.comp b/src/intel/vulkan/bvh/encode.comp index b12952b57a7..0ecae5867c8 100644 --- a/src/intel/vulkan/bvh/encode.comp +++ b/src/intel/vulkan/bvh/encode.comp @@ -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) {