From: Rob Clark Date: Sat, 8 Dec 2018 18:21:52 +0000 (-0500) Subject: mesa/st/nir: fix missing nir_compact_varyings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfe8220904b79ee45083970c0325bf59a140e163;p=mesa.git mesa/st/nir: fix missing nir_compact_varyings 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 Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index d0475fb538a..7406e26e2f8 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -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); }