glsl/linker: fix multiple streams transform feedback.
e2791b38b4
mesa/program_interface_query: fix transform feedback varyings.
caused a regression in
GL45-CTS.gtf40.GL3Tests.transform_feedback3.transform_feedback3_multiple_streams
on radeonsi.
The problem was it was using the skip components varying to set
the stream id, when it should wait until a varying was written,
this just adds the varying checks in the right place.
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -1117,21 +1117,23 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
|
|||||||
num_buffers++;
|
num_buffers++;
|
||||||
buffer_stream_id = -1;
|
buffer_stream_id = -1;
|
||||||
continue;
|
continue;
|
||||||
} else if (buffer_stream_id == -1) {
|
} else if (tfeedback_decls[i].is_varying()) {
|
||||||
/* First varying writing to this buffer: remember its stream */
|
if (buffer_stream_id == -1) {
|
||||||
buffer_stream_id = (int) tfeedback_decls[i].get_stream_id();
|
/* First varying writing to this buffer: remember its stream */
|
||||||
} else if (buffer_stream_id !=
|
buffer_stream_id = (int) tfeedback_decls[i].get_stream_id();
|
||||||
(int) tfeedback_decls[i].get_stream_id()) {
|
} else if (buffer_stream_id !=
|
||||||
/* Varying writes to the same buffer from a different stream */
|
(int) tfeedback_decls[i].get_stream_id()) {
|
||||||
linker_error(prog,
|
/* Varying writes to the same buffer from a different stream */
|
||||||
"Transform feedback can't capture varyings belonging "
|
linker_error(prog,
|
||||||
"to different vertex streams in a single buffer. "
|
"Transform feedback can't capture varyings belonging "
|
||||||
"Varying %s writes to buffer from stream %u, other "
|
"to different vertex streams in a single buffer. "
|
||||||
"varyings in the same buffer write from stream %u.",
|
"Varying %s writes to buffer from stream %u, other "
|
||||||
tfeedback_decls[i].name(),
|
"varyings in the same buffer write from stream %u.",
|
||||||
tfeedback_decls[i].get_stream_id(),
|
tfeedback_decls[i].name(),
|
||||||
buffer_stream_id);
|
tfeedback_decls[i].get_stream_id(),
|
||||||
return false;
|
buffer_stream_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_xfb_qualifiers) {
|
if (has_xfb_qualifiers) {
|
||||||
|
Reference in New Issue
Block a user