mesa/st/nir: fix missing nir_compact_varyings
authorRob Clark <robdclark@gmail.com>
Sat, 8 Dec 2018 18:21:52 +0000 (13:21 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 20:51:34 +0000 (15:51 -0500)
LinkedTransformFeedback is normally populated, which had nerf'd varying
packing since the check was introduced.

Fixes: dbd52585fa9 st/nir: Disable varying packing when doing transform feedback.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp

index d0475fb538a1e8df3076e0c3a03bd4caac0dfb2a..7406e26e2f83d2cab61cb4b0b5e391d8fb2ba749 100644 (file)
@@ -758,7 +758,8 @@ st_link_nir(struct gl_context *ctx,
           * the pipe_stream_output->output_register field is based on the
           * pre-compacted driver_locations.
           */
-         if (!prev_shader->sh.LinkedTransformFeedback)
+         if (!(prev_shader->sh.LinkedTransformFeedback &&
+               prev_shader->sh.LinkedTransformFeedback->NumVarying > 0))
             nir_compact_varyings(shader_program->_LinkedShaders[prev]->Program->nir,
                               nir, ctx->API != API_OPENGL_COMPAT);
       }