glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Fix incorrect "Contradictory layout" link errors

Open Valentin-Sarthou opened this issue 8 months ago • 2 comments

Hello,

I've come across issues similar to #1516 and #3919 where "Contradictory layout" link errors are generated when using multiple compilation units and declaring a layout in only 1 compilation unit.

A similar fix was done in 6f723ebbe3b0eba0c543fa615b53fbdc3e6e22c7 for tessellation input and output primitives.

But the issue was still present for the following layouts:

  • Transform Feedback xfb_stride layout
  • Tessellation Evaluation vertex spacing & triangle ordering layouts (#3919)
  • Fragment Shader gl_FragDepth redeclaration with EXT_conservative_depth layouts (#1516)
  • Mesh Shader max_primitives layout
  • Vulkan Compute Shader local_size_x_id, local_size_y_id & local_size_z_id layouts

This PR attempts to fix all these remaining cases, and adds tests for each.

Valentin-Sarthou avatar Apr 03 '25 11:04 Valentin-Sarthou

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 03 '25 11:04 CLAassistant

FWIW I've tested that with this branch the errors are gone from flightgear's shader validation script (see https://gitlab.com/flightgear/fgdata/-/issues/45)

Many thanks for fixing this!

amalon avatar May 30 '25 08:05 amalon

@dnovillo Added missing entry in validation_fails.txt

Valentin-Sarthou avatar Jul 11 '25 15:07 Valentin-Sarthou

Hi @dnovillo, do you think you could add issues #1516 and #3919 to the "Development" section of this PR so that users are notified that their issues may be closed ? Thanks

Valentin-Sarthou avatar Jul 15 '25 13:07 Valentin-Sarthou

Hi @dnovillo, do you think you could add issues #1516 and #3919 to the "Development" section of this PR so that users are notified that their issues may be closed ? Thanks

Done. Thanks.

dnovillo avatar Aug 26 '25 19:08 dnovillo