소스 검색

glsl: Raise a link error for non-SSO ES programs with a TES but no TCS.

OpenGL allows the TCS to be missing and supplies an implicit passthrough
shader, but OpenGL ES does not (see section 7.3 of the ES 3.2 spec,
cited above in the code).

One open question is how to handle this for ARB_ES3_2_compatibility.
This patch raises the link error for all ES shading language programs,
but it might make sense to base it on the API.  The approach taken in
this patch is more restrictive, but should still allow any valid ES
programs to work in GL.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Andres Gomez <agomez@igalia.com>
tags/17.1-branchpoint
Kenneth Graunke 8 년 전
부모
커밋
e6e8475b0f
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10
    0
      src/compiler/glsl/linker.cpp

+ 10
- 0
src/compiler/glsl/linker.cpp 파일 보기

@@ -4743,6 +4743,16 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
"tessellation evaluation shader\n");
goto done;
}

if (prog->IsES) {
if (num_shaders[MESA_SHADER_TESS_EVAL] > 0 &&
num_shaders[MESA_SHADER_TESS_CTRL] == 0) {
linker_error(prog, "GLSL ES requires non-separable programs "
"containing a tessellation evaluation shader to also "
"be linked with a tessellation control shader\n");
goto done;
}
}
}

/* Compute shaders have additional restrictions. */

Loading…
취소
저장