Commit fbc97ab1 authored by Icecream95's avatar Icecream95 Committed by Marge Bot
Browse files

pan/mdg: Implement load_global_invocation_id



NIR generates global_invocation_id, but Clover lowers it to
global_invocation_id_zero_base. It isn't lowered for OpenGL,
so we need to support both intrinsics.
Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!8264>
parent 3448a42b
......@@ -1310,6 +1310,9 @@ compute_builtin_arg(nir_op op)
return 0x14;
case nir_intrinsic_load_local_invocation_id:
return 0x10;
case nir_intrinsic_load_global_invocation_id:
case nir_intrinsic_load_global_invocation_id_zero_base:
return 0x18;
default:
unreachable("Invalid compute paramater loaded");
}
......@@ -1797,6 +1800,8 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
case nir_intrinsic_load_work_group_id:
case nir_intrinsic_load_local_invocation_id:
case nir_intrinsic_load_global_invocation_id:
case nir_intrinsic_load_global_invocation_id_zero_base:
emit_compute_builtin(ctx, instr);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment