mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 06:10:23 +01:00
ac/nir/tess: Return undef when loading an unwritten TCS output.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28487>
This commit is contained in:
parent
a1c821e911
commit
a167cb9ba3
1 changed files with 4 additions and 0 deletions
|
|
@ -544,6 +544,10 @@ lower_hs_output_load(nir_builder *b,
|
|||
return nir_extract_bits(b, &var, 1, component * bit_size, num_components, bit_size);
|
||||
}
|
||||
|
||||
/* If an output is not stored by the shader, replace the output load by undef. */
|
||||
if (!tcs_output_needs_lds(intrin, b->shader, st))
|
||||
return nir_undef(b, intrin->def.num_components, intrin->def.bit_size);
|
||||
|
||||
nir_def *off = hs_output_lds_offset(b, st, intrin);
|
||||
return nir_load_shared(b, intrin->def.num_components, intrin->def.bit_size, off);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue