On 04/11/2014 04:29 PM, Eric Anholt wrote: > Ian Romanick <i...@freedesktop.org> writes: > >> From: Ian Romanick <ian.d.roman...@intel.com> >> >> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> >> --- >> src/glsl/linker.cpp | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp >> index ee07e89..e02ce87 100644 >> --- a/src/glsl/linker.cpp >> +++ b/src/glsl/linker.cpp >> @@ -2161,7 +2161,8 @@ link_shaders(struct gl_context *ctx, struct >> gl_shader_program *prog) >> /* Geometry shaders have to be linked with vertex shaders. >> */ >> if (num_shaders[MESA_SHADER_GEOMETRY] > 0 && >> - num_shaders[MESA_SHADER_VERTEX] == 0) { >> + num_shaders[MESA_SHADER_VERTEX] == 0 && >> + !prog->SeparateShader) { >> linker_error(prog, "Geometry shader must be linked with " >> "vertex shader\n"); >> goto done; > > It looks like ARB_sso is relaxing things so that you're supposed to > check for this at draw time, but I don't see that happening. That said, > this patch itself looks correct.
You are correct. Good catch. I'll need to add that check and a piglit test. > -- Section 2.16, "Geometry Shaders" (page 153) > > Change the 4th paragraph: > > "A program object or program pipeline object that includes a > geometry shader must also include a vertex shader. If the current > program state has a geometry shader but no vertex shader at Begin or > any command that implicitly calls Begin, an INVALID_OPERATION error > will be generated." > > ... > > Errors > ... > The INVALID_OPERATION error produced by LinkProgram if the program > object has a geometry, tessellation control, or tessellation > evalutations shader attached and no vertex shader attached is now > produced at Begin time. >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev