diff options
author | Dave Airlie <[email protected]> | 2016-05-31 12:51:47 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-06-01 13:30:41 +1000 |
commit | 1fe7bbb911ac708999685c942e971693b688a334 (patch) | |
tree | d209c605433a999c13e4a0defa741cf448d5750d /src/compiler | |
parent | e891f7cf55f2f3e3d37ece12e5c64f4be70e3845 (diff) |
glsl/linker: fix multiple streams transform feedback.
e2791b38b42f83add5b07298c39741bf0a6d7d4b
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" <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 7c3bedf3574..a286e773b30 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -1117,21 +1117,23 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog, num_buffers++; buffer_stream_id = -1; continue; - } else if (buffer_stream_id == -1) { - /* First varying writing to this buffer: remember its stream */ - buffer_stream_id = (int) tfeedback_decls[i].get_stream_id(); - } else if (buffer_stream_id != - (int) tfeedback_decls[i].get_stream_id()) { - /* Varying writes to the same buffer from a different stream */ - linker_error(prog, - "Transform feedback can't capture varyings belonging " - "to different vertex streams in a single buffer. " - "Varying %s writes to buffer from stream %u, other " - "varyings in the same buffer write from stream %u.", - tfeedback_decls[i].name(), - tfeedback_decls[i].get_stream_id(), - buffer_stream_id); - return false; + } else if (tfeedback_decls[i].is_varying()) { + if (buffer_stream_id == -1) { + /* First varying writing to this buffer: remember its stream */ + buffer_stream_id = (int) tfeedback_decls[i].get_stream_id(); + } else if (buffer_stream_id != + (int) tfeedback_decls[i].get_stream_id()) { + /* Varying writes to the same buffer from a different stream */ + linker_error(prog, + "Transform feedback can't capture varyings belonging " + "to different vertex streams in a single buffer. " + "Varying %s writes to buffer from stream %u, other " + "varyings in the same buffer write from stream %u.", + tfeedback_decls[i].name(), + tfeedback_decls[i].get_stream_id(), + buffer_stream_id); + return false; + } } if (has_xfb_qualifiers) { |