ac/llvm: Implement load_num_subgroups for NGG shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
This commit is contained in:
parent
1a95d43e55
commit
c9f8be9d58
|
@ -3075,6 +3075,8 @@ static LLVMValueRef visit_load_num_subgroups(struct ac_nir_context *ctx)
|
|||
if (ctx->stage == MESA_SHADER_COMPUTE) {
|
||||
return LLVMBuildAnd(ctx->ac.builder, ac_get_arg(&ctx->ac, ctx->args->tg_size),
|
||||
LLVMConstInt(ctx->ac.i32, 0x3f, false), "");
|
||||
} else if (ctx->args->merged_wave_info.used) {
|
||||
return ac_unpack_param(&ctx->ac, ac_get_arg(&ctx->ac, ctx->args->merged_wave_info), 28, 4);
|
||||
} else {
|
||||
return LLVMConstInt(ctx->ac.i32, 1, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue