On Wed, Jan 10, 2018 at 3:54 AM, Karol Herbst <kher...@redhat.com> wrote: > From: Rob Clark <robdcl...@gmail.com> > > This was handled for VS, but not for GS. > > Fixes for gallium drivers using nir: > spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams-without-invocations > spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams* > spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs* > spec@ext_transform_feedback@geometry-shaders-basic > spec@ext_transform_feedback@* use_gs > spec@glsl-1.50@execution@geometry@primitive-id* > spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart > gl_triangle_strip * > spec@glsl-1.50@transform-feedback-builtins > spec@glsl-1.50@transform-feedback-type-and-size > > v2: we don't need this for TCP > > Signed-off-by: Rob Clark <robdcl...@gmail.com> > Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> > Tested-by: Karol Herbst <kher...@redhat.com> > --- > src/mesa/state_tracker/st_program.c | 57 > ++++++++++++++++++++++++++++++++++--- > 1 file changed, 53 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/state_tracker/st_program.c > b/src/mesa/state_tracker/st_program.c > index 05e6042f42..2a1a695948 100644 > --- a/src/mesa/state_tracker/st_program.c > +++ b/src/mesa/state_tracker/st_program.c > @@ -1421,6 +1421,50 @@ st_translate_program_common(struct st_context *st, > } > } > > +/** > + * Update stream-output info for GS/TCS/TES. Normally this is done in > + * st_translate_program_common() but that is not called for glsl_to_nir > + * case. > + */ > +static void > +st_translate_program_stream_output(struct gl_program *prog, > + struct pipe_stream_output_info > *stream_output) > +{ > + if (!prog->sh.LinkedTransformFeedback) > + return; > + > + ubyte outputMapping[VARYING_SLOT_TESS_MAX]; > + GLuint attr; > + uint num_outputs = 0; > + > + memset(outputMapping, 0, sizeof(outputMapping)); > + > + /* > + * Determine number of outputs, the (default) output register > + * mapping and the semantic information for each output. > + */ > + for (attr = 0; attr < VARYING_SLOT_MAX; attr++) { > + if (prog->info.outputs_written & BITFIELD64_BIT(attr)) { > + GLuint slot = num_outputs++; > + > + outputMapping[attr] = slot; > + } > + } > + > + /* Also add patch outputs. */ > + for (attr = 0; attr < 32; attr++) { > + if (prog->info.patch_outputs_written & (1u << attr)) { > + GLuint slot = num_outputs++; > + GLuint patch_attr = VARYING_SLOT_PATCH0 + attr; > + > + outputMapping[patch_attr] = slot; > + } > + }
There are no patch outputs in shader stages supporting transform feedback. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev