pco: skip lowering fs outputs that aren't present

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Simon Perretta 2025-03-13 12:41:58 +00:00 committed by Marge Bot
parent db686e190a
commit c3987eb5fc

View file

@ -740,6 +740,9 @@ static nir_def *lower_pfo_store(nir_builder *b,
b->cursor = nir_before_instr(&intr->instr);
enum pipe_format format = state->fs->output_formats[location];
if (format == PIPE_FORMAT_NONE)
return NIR_LOWER_INSTR_PROGRESS_REPLACE;
format = to_pbe_format(b, format, &input);
nir_alu_type src_type = nir_intrinsic_src_type(intr);
@ -788,6 +791,8 @@ static nir_def *lower_pfo_load(nir_builder *b,
gl_frag_result location = io_semantics.location;
enum pipe_format format = state->fs->output_formats[location];
if (format == PIPE_FORMAT_NONE)
return nir_undef(b, intr->def.num_components, intr->def.bit_size);
format = to_pbe_format(b, format, NULL);