radeonsi: fix compilation of monolithic PS
This was totally broken. Monolithic PS is only used if FBFETCH or
interpolateAtSample are used.
When the PS prolog was built, it overwrote ctx->main_fn.
Discovered by @eefano.
Fixes: 8832a88434
"radeonsi: move PS LLVM code into si_shader_llvm_ps.c"
Closes: #2814
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4918>
This commit is contained in:
@@ -905,6 +905,7 @@ void si_llvm_build_monolithic_ps(struct si_shader_context *ctx, struct si_shader
|
||||
{
|
||||
LLVMValueRef parts[3];
|
||||
unsigned num_parts = 0, main_index;
|
||||
LLVMValueRef main_fn = ctx->main_fn;
|
||||
|
||||
union si_shader_part_key prolog_key;
|
||||
si_get_ps_prolog_key(shader, &prolog_key, false);
|
||||
@@ -915,7 +916,7 @@ void si_llvm_build_monolithic_ps(struct si_shader_context *ctx, struct si_shader
|
||||
}
|
||||
|
||||
main_index = num_parts;
|
||||
parts[num_parts++] = ctx->main_fn;
|
||||
parts[num_parts++] = main_fn;
|
||||
|
||||
union si_shader_part_key epilog_key;
|
||||
si_get_ps_epilog_key(shader, &epilog_key);
|
||||
|
Reference in New Issue
Block a user