radeonsi,radv/llvm: fix amdgpu-color/depth-export with epilogs
The main shader wouldn't use ac_build_export(), and the discard exit would
have no export.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 1174ab6d56
("ac/llvm: use amdgpu-color-export/amdgpu-depth-export")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7991
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20482>
This commit is contained in:
@@ -1243,9 +1243,16 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
|
||||
float_mode = AC_FLOAT_MODE_DENORM_FLUSH_TO_ZERO;
|
||||
}
|
||||
|
||||
bool exports_mrtz = false;
|
||||
bool exports_color_null = false;
|
||||
if (shaders[0]->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
exports_mrtz = info->ps.writes_z || info->ps.writes_stencil || info->ps.writes_sample_mask;
|
||||
exports_color_null = !exports_mrtz || (shaders[0]->info.outputs_written & (0xffu << FRAG_RESULT_DATA0));
|
||||
}
|
||||
|
||||
ac_llvm_context_init(&ctx.ac, ac_llvm, options->gfx_level, options->family,
|
||||
options->has_3d_cube_border_color_mipmap,
|
||||
float_mode, info->wave_size, info->ballot_bit_size);
|
||||
float_mode, info->wave_size, info->ballot_bit_size, exports_color_null, exports_mrtz);
|
||||
ctx.context = ctx.ac.context;
|
||||
|
||||
ctx.max_workgroup_size = info->workgroup_size;
|
||||
|
Reference in New Issue
Block a user