<div dir="ltr">Hi Timothy, Alejandro, Marek,<div><br></div><div>Thanks for review! Can we merge the patch now ?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 27, 2018 at 6:08 AM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reviewed-by: Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>><div class="HOEnZb"><div class="h5"><br>
<br>
On 24/08/18 18:25, Alejandro Piñeiro wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
CCing Timothy just in case he still thinks that the original comment<br>
should remain as it is. In any case, it looks to me, so:<br>
<br>
Reviewed-by: Alejandro Piñeiro <<a href="mailto:apinheiro@igalia.com" target="_blank">apinheiro@igalia.com</a>><br>
<br>
<br>
On 23/08/18 12:12, vadym.shovkoplias wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From Section 4.3.4 (Inputs) of the GLSL 1.50 spec:<br>
<br>
"Only the input variables that are actually read need to be written<br>
by the previous stage; it is allowed to have superfluous<br>
declarations of input variables."<br>
<br>
Fixes:<br>
* interstage-multiple-shader-obj<wbr>ects.shader_test<br>
<br>
v2:<br>
Update comment in ir.h since the usage of "used" field<br>
has been extended.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=101247" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/s<wbr>how_bug.cgi?id=101247</a><br>
Signed-off-by: Vadym Shovkoplias <<a href="mailto:vadym.shovkoplias@globallogic.com" target="_blank">vadym.shovkoplias@globallogic<wbr>.com</a>><br>
---<br>
src/compiler/glsl/ir.h | 4 ++--<br>
src/compiler/glsl/link_interfa<wbr>ce_blocks.cpp | 8 +++++++-<br>
2 files changed, 9 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h<br>
index 67b38f48ef..d05d1998a5 100644<br>
--- a/src/compiler/glsl/ir.h<br>
+++ b/src/compiler/glsl/ir.h<br>
@@ -667,8 +667,8 @@ public:<br>
* variable has been used. For example, it is an error to redeclare a<br>
* variable as invariant after it has been used.<br>
*<br>
- * This is only maintained in the ast_to_hir.cpp path, not in<br>
- * Mesa's fixed function or ARB program paths.<br>
+ * This is maintained in the ast_to_hir.cpp path and during linking,<br>
+ * but not in Mesa's fixed function or ARB program paths.<br>
*/<br>
unsigned used:1;<br>
diff --git a/src/compiler/glsl/link_inter<wbr>face_blocks.cpp b/src/compiler/glsl/link_inter<wbr>face_blocks.cpp<br>
index e5eca9460e..801fbcd5d9 100644<br>
--- a/src/compiler/glsl/link_inter<wbr>face_blocks.cpp<br>
+++ b/src/compiler/glsl/link_inter<wbr>face_blocks.cpp<br>
@@ -417,9 +417,15 @@ validate_interstage_inout_bloc<wbr>ks(struct gl_shader_program *prog,<br>
* write to any of the pre-defined outputs (e.g. if the vertex shader<br>
* does not write to gl_Position, etc), which is allowed and results in<br>
* undefined behavior.<br>
+ *<br>
+ * From Section 4.3.4 (Inputs) of the GLSL 1.50 spec:<br>
+ *<br>
+ * "Only the input variables that are actually read need to be written<br>
+ * by the previous stage; it is allowed to have superfluous<br>
+ * declarations of input variables."<br>
*/<br>
if (producer_def == NULL &&<br>
- !is_builtin_gl_in_block(var, consumer->Stage)) {<br>
+ !is_builtin_gl_in_block(var, consumer->Stage) && var->data.used) {<br>
linker_error(prog, "Input block `%s' is not an output of "<br>
"the previous stage\n", var->get_interface_type()->nam<wbr>e);<br>
return;<br>
</blockquote>
<br>
</blockquote>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font size="-1"><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Vadym Shovkoplias | Senior Software Engineer</span><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">GlobalLogic</span><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></font><font size="-1"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span><font color="#888888"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px">P </span><a style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px">+380.57.766.7667</a></font></span> M +3.8050.931.7304 S vadym.shovkoplias</span><br><a href="http://www.globallogic.com/" target="_blank"><span style="font-size:12px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">www.globallogic.com</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:12px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><br><a href="http://www.globallogic.com/" target="_blank"><span style="font-size:12px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline"></span></a><br><a href="http://www.globallogic.com/email_disclaimer.txt" target="_blank"><span style="font-size:11px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">http://www.globallogic.com/email_disclaimer.txt</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:11px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></font></div></div></div></div></div></div></div>
</div>