mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
nir/opt_varyings: clear info->clip/cull_distance_array_size if relocated
svga breaks if shader_info declares these, but the shader is missing the outputs. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32684>
This commit is contained in:
parent
9d129505b5
commit
a50d069d1c
1 changed files with 8 additions and 0 deletions
|
|
@ -5301,6 +5301,14 @@ nir_opt_varyings(nir_shader *producer, nir_shader *consumer, bool spirv,
|
|||
free_linkage(linkage);
|
||||
FREE(linkage);
|
||||
|
||||
/* Compaction moves CLIP_DIST and CULL_DIST outputs to VARn if the next
|
||||
* shader is not FS. Clear those fields in shader_info.
|
||||
*/
|
||||
if (consumer->info.stage <= MESA_SHADER_GEOMETRY) {
|
||||
producer->info.clip_distance_array_size = 0;
|
||||
producer->info.cull_distance_array_size = 0;
|
||||
}
|
||||
|
||||
if (progress & nir_progress_producer)
|
||||
nir_validate_shader(producer, "nir_opt_varyings");
|
||||
if (progress & nir_progress_consumer)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue