[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #11 from vadym  ---
Hi Marcel,

Glad to hear this issue is finally fixed! Thanks a lot for such a high quality
bug report and assistance/testing. 

Piglit test is also updated with the additional out variable:
https://patchwork.freedesktop.org/patch/258899/

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Marcel Heinz  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #10 from Marcel Heinz  ---
Hi Vadym,

I have to take my last comment back. It turned out that in the two remaining
cases, there was actually no output declaration for the variable in question,
so mesa's behavior was perfectly right already.

Changed bug to RESOLVED status.

Thank You very much.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #9 from Marcel Heinz  ---
Hi Vadym,

thank you for that patch. Again, it does fix the updated reproducer, but the
issue is still not completely resolved in the real application. However, it is
down from 17 failing programs to only 2, so we are getting closer.

I will try to isolate the issue in the two remaining programs, and report back
my findings.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #8 from vadym  ---
(In reply to Marcel Heinz from comment #7)
> Reopened bug because bug was not completely resolved. See the second
> attachment with the updated reproducer code for another case to tirgger the
> issue.

Hi Marcel,

Thanks for the new test. I also able to reproduce this. Already found the
reason and pushed new patch: https://patchwork.freedesktop.org/patch/258176/

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Marcel Heinz  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #7 from Marcel Heinz  ---
Reopened bug because bug was not completely resolved. See the second attachment
with the updated reproducer code for another case to tirgger the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Marcel Heinz  changed:

   What|Removed |Added

 Attachment #142005|updated reproduced code |updated reproducer code
description||

--- Comment #6 from Marcel Heinz  ---
Comment on attachment 142005
  --> https://bugs.freedesktop.org/attachment.cgi?id=142005
updated reproducer code

The bugfix from https://patchwork.freedesktop.org/patch/246171/ did solve the
issue for my first reproducer, the issue is not completely resolved.

This is an updated version of the reproducer code, which triggers the issue
again.

The only changes are that there are now _two_ VS outputs which are not written
to, but both are used in the fragment shader:

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-10-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #5 from Marcel Heinz  ---
Created attachment 142005
  --> https://bugs.freedesktop.org/attachment.cgi?id=142005=edit
updated reproduced code

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-08-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #4 from Timothy Arceri  ---
(In reply to Mark Janes from comment #3)
> Vadym, can you make a piglit test for this bug?

Hi Mark, this was already done :)

commit c98669cbd1f801c8fda25aceab23b5c54de76b9e
Author: Vadym Shovkoplias 
Date:   Mon Aug 27 15:19:40 2018 +0300

glsl-1.30: add linker test for inter stage in/out vars usage

This test exposes a Mesa GLSL linker bug. The test fails with the
following error message:

   error: fragment shader input `foo' has no matching output in the
previous
  stage

Signed-off-by: Vadym Shovkoplias 
Reviewed-by: Timothy Arceri 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-08-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #3 from Mark Janes  ---
Vadym, can you make a piglit test for this bug?

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-08-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Timothy Arceri  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #2 from Timothy Arceri  ---
Should be fixed by:

Author: vadym.shovkoplias 
Date:   Tue Aug 28 10:32:18 2018 +0300

glsl/linker: Link all out vars from a shader objects on a single stage

During intra stage linking some out variables can be dropped because
it is not used in a shader with the main function. But these out vars
can be referenced on later stages which can lead to further linking
errors.

Signed-off-by: Vadym Shovkoplias 
Reviewed-by: Timothy Arceri 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-08-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

--- Comment #1 from vadym  ---
Patch: https://patchwork.freedesktop.org/patch/246171/

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-03-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Marcel Heinz  changed:

   What|Removed |Added

 CC||quisqui...@gmx.de

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 105731] linker error "fragment shader input ... has no matching output in the previous stage" when previous stage's output declaration in a separate shader object

2018-03-24 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=105731

Bug ID: 105731
   Summary: linker error "fragment shader input ... has no
matching output in the previous stage" when previous
stage's output declaration in a separate shader object
   Product: Mesa
   Version: git
  Hardware: All
OS: Linux (All)
Status: NEW
  Severity: minor
  Priority: medium
 Component: glsl-compiler
  Assignee: mesa-dev@lists.freedesktop.org
  Reporter: quisqui...@gmx.de
QA Contact: intel-3d-b...@lists.freedesktop.org

Created attachment 138342
  --> https://bugs.freedesktop.org/attachment.cgi?id=138342=edit
C/OpenGL code to trigger the issue

GLSL spec (using version 4.30 here, section "4.3.4 Input variables", page 43f)
states that there should be no link error if an input variable is used for
which there is no static use in the previous stage, but a valid output
declaration.

Mesa's linker seems to adhere to this not in every case. If the declaration is
in a separate shader object, it fails to link. See the attached example code.
The key point is the following vertex shader:

static const char *vs_part1=
"out vec4 foo;\n"
"void unused() {foo=vec4(1);}\n";

static const char *vs_part2=
"in vec4 pos;\n"
"void main() { gl_Position = pos; }\n";

used in conjunction with this fragment shader:
static const char *fs_part1=
"in vec4 foo;\n"
"out vec4 color;\n"
"void main() {color=foo;}\n";

When this is created as a single GL_VERTEX_SHADER with both strings
concatenated (via glShaderSource), the resulting program will link, just with a
warning

warning: fragment shader varying foo not written by vertex shader

which is conforming behavior.

However, when vs_part1 and vs_part2 are compiled as separate shader objects,
the final link fails with

error: fragment shader input `foo' has no matching output in the previous 
   stage

which (in my interpretation of the spec) should not happen.

Tested with:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.1
(git-092c485)

as well as:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-devel
(git-ff0e3fa1fe)

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev