summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa/es: Validate glLightModel pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-35/+11
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glMaterial face and pname in Mesa code rather than the ES ↵Ian Romanick2012-08-292-32/+5
| | | | | | wrapper Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetMaterial pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-21/+6
| | | | | | | | Fixes a bug that glGetMaterial[fx]v in ES1 contexts would (try to) allow queries of GL_AMBIENT_AND_DIFFUSE. This enum can only be used in glMaterial, not in the get. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetPointerv pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-12/+33
| | | | | | v2: Add proper core-profile, GLES1, and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glMatrixMode mode in Mesa code rather than the ES wrapperIan Romanick2012-08-292-10/+4
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glFog pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-54/+12
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glReadPixels format and type in Mesa code rather than the ↵Ian Romanick2012-08-292-53/+33
| | | | | | | | ES wrapper v2: Add proper GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glPixelStore pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-29/+37
| | | | | | v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glEnable cap in Mesa code rather than the ES wrapperIan Romanick2012-08-292-183/+296
| | | | | | | | | Also handle glDisable, glIsEnabled, glEnableClientState, and glDisableClientState. v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glHint target in Mesa code rather than the ES wrapperIan Romanick2012-08-292-19/+25
| | | | | | v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetVertexAttribf pname in Mesa code rather than the ES ↵Ian Romanick2012-08-292-19/+12
| | | | | | | | | | | wrapper v2: Add proper core-profile and GLES3 filtering. v3: Allow glGetVertexAttribfv(0, GL_CURRENT_VERTEX_ATTRIB_ARB, param) in OpenGL 3.1, just like OpenGL ES 2.0. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetString pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-15/+12
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate primitive modes in Mesa code rather than the ES wrapperIan Romanick2012-08-292-42/+5
| | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Refactor _mesa_valid_prim_mode to use a switch-statementIan Romanick2012-08-291-5/+27
| | | | | | This makes the next change a bit easier. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate blend function enums in Mesa code rather than the ES wrapperIan Romanick2012-08-292-115/+11
| | | | | | | | | v2: Add proper core-profile filtering. v3: Allow GL_SRC_ALPHA_SATURATE as a destination factor in GLES3. Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glClear mask in Mesa code rather than the ES wrapperIan Romanick2012-08-292-11/+9
|
* mesa/es: Validate glRenderbufferStorage internalFormat in Mesa code rather ↵Ian Romanick2012-08-292-90/+132
| | | | | | | | | | | | | | than the ES wrapper v2: Add proper core-profile and GLES3 filtering. v3: Allow GL_RGB10_A2UI in GLES3 based on review feedback from Eric Anholt. v4: Arg. Reject unsized RED and RG enums on GLES. More feedback from Eric. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetRenderbufferParameter pname in Mesa code rather than ↵Ian Romanick2012-08-292-29/+2
| | | | | | | | | the ES wrapper v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glGetFramebufferAttachmentParameter pname in Mesa code ↵Ian Romanick2012-08-292-42/+29
| | | | | | | | | | | | rather than the ES wrapper v2: Add proper core-profile, GLES1, and GLES3 filtering. v3: Fix the GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query when the attachment type is GL_NONE on GLES3. Other cleanups. Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGenerateMipmap target in Mesa code rather than the ES ↵Ian Romanick2012-08-292-9/+9
| | | | | | | | | | | | | | | wrapper v2: Add proper core-profile and GLES3 filtering. v3: Fix a typo in GL_TEXTURE_2D_ARRAY checking. v4: Change !_mesa_is_desktop_gl tests to _mesa_is_gles test. The test around GL_TEXTURE_2D_ARRAY got some other changes because that enum is also available with GLES3 (which uses API_OPENGLES2). Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glFramebufferTexture2D textarget in Mesa code rather than ↵Ian Romanick2012-08-292-18/+4
| | | | | | | | | | | | | the ES wrapper v2: Add proper core-profile and GLES3 filtering. v3: Change !_mesa_is_desktop_gl tests to _mesa_is_gles test. The test around GL_TEXTURE_2D_ARRAY got some other changes because that enum is also available with GLES3 (which uses API_OPENGLES2). Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa: convert a few more macros to inline functionsBrian Paul2012-08-291-22/+21
|
* mesa: remove COPY_4V_CAST() macroBrian Paul2012-08-292-10/+1
| | | | Only used in one place, and not really needed.
* mesa: convert a bunch of math macros to inline functionsBrian Paul2012-08-291-56/+86
|
* mesa: test for GL_EXT_framebuffer_sRGB in glPopAttrib()Brian Paul2012-08-291-1/+2
| | | | To avoid spurious GL_INVALID_ENUM errors if the extension isn't supported.
* mesa: Define CPU_TO_LE32 to work on OpenBSDMartin Pieuchot2012-08-291-0/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Add constants for the GL_QUERY_COUNTER_BITS per target.Eric Anholt2012-08-262-1/+44
| | | | | | | | | | | | Drivers need to be able to communicate their actual number of bits populated in the field in order for applications to be able to properly handle rollover. There's a small behavior change here: Instead of reporting the GL_SAMPLES_PASSED bits for GL_ANY_SAMPLES_PASSED (which would also be valid), just return 1, because more bits don't make any sense. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Use a new, more specific hook for shader uniform changes.Kenneth Graunke2012-08-253-2/+11
| | | | | | | | | | | | | | | Gallium drivers and i965 don't require special notification when sampler uniforms change. They simply see the _NEW_TEXTURE and adjust their indirection tables. These drivers don't want ProgramStringNotify: it simply causes pointless recompiles. Unfortunately, i915 still requires shader recompiles and needs ProgramStringNotify. Rather than trying to fix that, simply change the hook to a new, more specific one: ShaderUniformChange. On i915, this translates to ProgramStringNotify; others simply ignore it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glGetBufferParameteriv pname in Mesa code rather than the ↵Ian Romanick2012-08-242-10/+6
| | | | | | | | | ES wrapper v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glMapBuffer access in Mesa code rather than the ES wrapperIan Romanick2012-08-242-4/+9
| | | | | | | | | | | v2: Add proper core-profile and GLES3 filtering. v3: *Really* add proper core-profile and GLES3 filtering based on review feedback from Eric Anholt. It looks like previously there was some rebase / merge fail. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glBufferData usage in Mesa code rather than the ES wrapperIan Romanick2012-08-242-11/+18
| | | | | | | | | v2: Add proper core-profile and GLES3 filtering based on review feedback from Eric Anholt. It looks like previously there was some rebase / merge fail. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate buffer object targets in Mesa code rather than the ES wrapperIan Romanick2012-08-242-36/+8
| | | | | | | v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate VertexPointer types in Mesa code rather than the ES wrapperIan Romanick2012-08-242-15/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Remove redundant vertex pointer size validationIan Romanick2012-08-241-6/+0
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate TexCoordPointer size in Mesa code rather than the ES wrapperIan Romanick2012-08-242-7/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate TexCoordPointer types in Mesa code rather than the ES wrapperIan Romanick2012-08-242-16/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate NormalPointer types in Mesa code rather than the ES wrapperIan Romanick2012-08-242-13/+6
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate ColorPointer size in Mesa code rather than the ES wrapperIan Romanick2012-08-242-5/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate ColorPointer types in Mesa code rather than the ES wrapperIan Romanick2012-08-242-14/+8
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Remove redundant vertex attrib pointer type validationIan Romanick2012-08-241-22/+0
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Remove redundant vertex attrib pointer size validationIan Romanick2012-08-241-7/+0
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Disallow BGRA vertex arrays in ES or ES2 contextsIan Romanick2012-08-241-0/+5
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Rearrange array type checking, filter more types in ESIan Romanick2012-08-241-9/+25
| | | | | | | | | v2: Fix handling of GL_INT and GL_UNSIGNED_INT types pre-ES3.0, and fix handling of GL_INT_2_10_10_10_REV and GL_UNSIGNED_INT_2_10_10_10_REV in ES3.0. Based on review comments by Ken Graunke. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Refactor element type checking into its own functionIan Romanick2012-08-241-23/+25
| | | | | | | | | | | | This consolidates the tests and makes the emitted error message consistent. v2: Rename _mesa_valid_element_type to valid_elements_type. Log the enum string instead of the hex value in error messages. Based on review comments from Brian Paul and Ken Graunke. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add generic compressed -> uncompressed format helperBrian Paul2012-08-242-0/+42
| | | | | | | _mesa_generic_compressed_format_to_uncompressed_format() probably wins the prize for longest function name in Mesa. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: don't try (generic) compression of 1D and 1D_ARRAY texturesBrian Paul2012-08-241-12/+26
| | | | | | | | | | See comments in the code for details. Note: we only need to special-case the generic compressed formats since specific texture formats are error-checked earlier to see if the compression format is compatible with the texture type. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add texture target field to ChooseTextureFormat() driver hookBrian Paul2012-08-245-11/+16
| | | | | | | | | This will let us choose the actual hardware format depending on the type of texture. v2: fixup radeon, nouveau, intel and swrast drivers too Reviewed-by: Eric Anholt <[email protected]>
* Move _mesa_dl* functions into dlopen.h and inline themMatt Turner2012-08-242-120/+75
| | | | | | No point in having an extra function call for inlinable functions. Reviewed-by: Tapani Pälli <[email protected]>
* mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCETapani Pälli2012-08-241-4/+4
| | | | | | | | | | | | | Patches changes mesa to use 'HAVE_DLOPEN' defined by configure and Android.mk instead of _GNU_SOURCE for detecting dlopen capability. This makes dlopen to work also on Android where _GNU_SOURCE is not defined. [mattst88] v2: HAVE_DLOPEN is sufficient for including dlfcn.h, remove mingw/blrts checks around dlfcn.h inclusion. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Tapani Pälli <[email protected]>
* mesa/es: Validate glCreateShader targets in Mesa code rather than the ES wrapperIan Romanick2012-08-242-6/+1
| | | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>