mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
agx: fix xfb of invalid var
KHR-Single-GL44.enhanced_layouts.xfb_capture_struct Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
parent
e0c1776187
commit
a20c693b7f
1 changed files with 5 additions and 1 deletions
|
|
@ -641,9 +641,13 @@ write_xfb(nir_builder *b, struct lower_gs_state *state, unsigned stream,
|
|||
|
||||
/* We write out the vertices backwards, since 0 is the current
|
||||
* emitted vertex (which is actually the last vertex).
|
||||
*
|
||||
* We handle NULL var for
|
||||
* KHR-Single-GL44.enhanced_layouts.xfb_capture_struct.
|
||||
*/
|
||||
unsigned v = (verts - 1) - vert;
|
||||
nir_def *value = nir_load_var(b, state->outputs[output.location][v]);
|
||||
nir_variable *var = state->outputs[output.location][v];
|
||||
nir_def *value = var ? nir_load_var(b, var) : nir_undef(b, 4, 32);
|
||||
|
||||
/* In case output.component_mask contains invalid components, write
|
||||
* out zeroes instead of blowing up validation.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue