summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-20 13:26:52 -0700
committerEric Anholt <[email protected]>2018-07-05 12:38:27 -0700
commitdbd52585fa9fe79aabea3560cb3aaefffe544af9 (patch)
tree4218d2872bce28628c39c3edb447a4ea641847ea /src/mesa
parentab7aa0f10cad31c79fc2ae519733564e1557478a (diff)
st/nir: Disable varying packing when doing transform feedback.
The varying packing would result in st_nir_assign_var_locations() picking new driver_locations, despite the pipe_stream_output already being set up for the old driver location. This left the gallium driver with no way to work back to what varying was referenced by pipe_stream_output. Fixes these tests on V3D: dEQP-GLES3.functional.transform_feedback.random.separate.points.3 dEQP-GLES3.functional.transform_feedback.random.separate.points.7 dEQP-GLES3.functional.transform_feedback.random.separate.points.9 dEQP-GLES3.functional.transform_feedback.random.separate.triangles.3 dEQP-GLES3.functional.transform_feedback.random.separate.triangles.8 Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index fc4bba3fb96..1985fe1d532 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -745,7 +745,15 @@ st_link_nir(struct gl_context *ctx,
shader->Program->info = nir->info;
if (prev != -1) {
- nir_compact_varyings(shader_program->_LinkedShaders[prev]->Program->nir,
+ struct gl_program *prev_shader =
+ shader_program->_LinkedShaders[prev]->Program;
+
+ /* We can't use nir_compact_varyings with transform feedback, since
+ * the pipe_stream_output->output_register field is based on the
+ * pre-compacted driver_locations.
+ */
+ if (!prev_shader->sh.LinkedTransformFeedback)
+ nir_compact_varyings(shader_program->_LinkedShaders[prev]->Program->nir,
nir, ctx->API != API_OPENGL_COMPAT);
}
prev = i;