diff options
author | Marek Olšák <[email protected]> | 2020-01-08 21:51:23 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-15 20:17:23 +0000 |
commit | af3fbb410c245698c00290189c227a870f5bf41c (patch) | |
tree | 40c2779eeb21c69160118ea26fa468fa44bd1982 /src/gallium | |
parent | 6d4993c94280a044f8d427c7a3247a3b2f75c835 (diff) |
radeonsi: fix si_build_wrapper_function for compute-based primitive culling
Fixes: 3b143369a55 "ac/nir, radv, radeonsi: Switch to using ac_shader_args"
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3338>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 99d4f818806..c229eb967c8 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -4739,7 +4739,20 @@ void si_build_wrapper_function(struct si_shader_context *ctx, LLVMValueRef *part */ enum ac_arg_type arg_type = AC_ARG_INT; if (LLVMGetTypeKind(type) == LLVMPointerTypeKind) { - arg_type = AC_ARG_CONST_PTR; + type = LLVMGetElementType(type); + + if (LLVMGetTypeKind(type) == LLVMVectorTypeKind) { + if (LLVMGetVectorSize(type) == 4) + arg_type = AC_ARG_CONST_DESC_PTR; + else if (LLVMGetVectorSize(type) == 8) + arg_type = AC_ARG_CONST_IMAGE_PTR; + else + assert(0); + } else if (type == ctx->f32) { + arg_type = AC_ARG_CONST_FLOAT_PTR; + } else { + assert(0); + } } ac_add_arg(&ctx->args, gprs < num_sgprs ? AC_ARG_SGPR : AC_ARG_VGPR, |