diff options
author | Eric Anholt <[email protected]> | 2011-07-22 12:57:47 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-10-18 10:54:32 -0700 |
commit | 57f7978b1de40be6eb138d391c8d9f95b68cbf62 (patch) | |
tree | da00d5d3faa359f2f8f689dd565e1aa6e331bd7b /src/mesa | |
parent | f868cb09639d69acbc900842263ac2d28b60bcc0 (diff) |
mesa: Add a flag for shader programs to allow SSO linkage in GLES2.
On converting fixed function programs to generate GLSL, the linker
became cranky that we were trying to make something that wasn't a
linked vertex+fragment program. Given that the Mesa GLES2 drivers
also support desktop GL with EXT_sso, just telling the linker to shut
up seems like the easiest solution.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a7d1cb2b111..17c645a7ee5 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2135,6 +2135,17 @@ struct gl_shader_program GLint RefCount; /**< Reference count */ GLboolean DeletePending; + /** + * Flags that the linker should not reject the program if it lacks + * a vertex or fragment shader. GLES2 doesn't allow separate + * shader objects, and would reject them. However, we internally + * build separate shader objects for fixed function programs, which + * we use for drivers/common/meta.c and for handling + * _mesa_update_state with no program bound (for example in + * glClear()). + */ + GLboolean InternalSeparateShader; + GLuint NumShaders; /**< number of attached shaders */ struct gl_shader **Shaders; /**< List of attached the shaders */ |