When having UBOs or SSBOs in different compilation units in the same
program, the binding point, if defined, should match or report a
linking error.

1) This program should fail on linking:

    "# VS

    layout(binding = 1) Block {
      vec4 color;
    } uni_block1;

    ...

    # FS

    layout(binding = 2) Block {
      vec4 color;
    } uni_block2;

    ..."

   Currently, it doesn't.

2) However, the checking of the layout in the shader interface for
   UBOs and SSBOs must be done at the Interface Block name level, not
   at the instance name level. This program should succeed on linking:

    "# VS

    layout(binding = 1) Block1 {
      vec4 color;
    } uni_block;

    ...

    # FS

    layout(binding = 2) Block2 {
      vec4 color;
    } uni_block;

    ..."

   Currently, it fails.

Fixes:
- GL45-CTS.enhanced_layouts.ssb_layout_qualifier_conflict

Andres Gomez (3):
  glsl: on UBO/SSBOs link error, the number of active blocks remains 0
  glsl: UBOs and SSBOs must match the binding qualifier too
  glsl: Interface Block instances don't need linking validation

 src/compiler/glsl/link_uniform_blocks.cpp |  3 +++
 src/compiler/glsl/linker.cpp              | 15 ++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

-- 
2.11.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to