summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: use FLUSH_CURRENT and not FLUSH_VERTICES in _mesa_validate_*Marek Olšák2012-07-021-7/+14
| | | | | | | | | | | | | | | | ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL calls FLUSH_VERTICES, which is not what we want. This fixes a breakage in classic drivers, introduced in: 62b971673950148eb949ba23d7fdc47debea16f0 vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around It should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51629 https://bugs.freedesktop.org/show_bug.cgi?id=51642 Reviewed-by: Brian Paul <[email protected]>
* mesa: remove some unused gl_dlist_state fieldsBrian Paul2012-06-291-6/+0
|
* vbo: optimize validation for glMultiDrawElementsMarek Olšák2012-06-282-0/+76
| | | | | | | | | Some parameters need to be checked only once. check_valid_to_render needs to be called only once. The validate function is based on the one for DrawElements. Reviewed-by: Brian Paul <[email protected]>
* vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way aroundMarek Olšák2012-06-281-6/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: rename MaxTransformFeedbackSeparateAttribs to MaxTransformFeedbackBuffersMarek Olšák2012-06-286-16/+17
| | | | | | | | | | | | This is a cleanup for ARB_transform_feedback3, where GL_MAX_TRANSFORM_FEEDBACK_BUFFERS is introduced for interleaved attribs and has the same meaning as GL_MAX_.._SEPARATE_ATTRIBS for separate attribs. Also, the maximum number of TFB buffers is reduced from 32 to 4, which makes this patch useful even without the extension. I don't know of any hardware which can do more than 4. Reviewed-by: Brian Paul <[email protected]>
* mesa: more const qualifiers to match the latest glext.hBrian Paul2012-06-272-3/+3
| | | | | | | For some reason regular gcc on Linux didn't catch these but the mingw compiler did (generated errors, not warnings). v2: include the changes in src/mapi/ too
* glapi: add const qualifier to glShaderSourceARB() parameterBrian Paul2012-06-271-1/+1
| | | | | | | | | Fixes the es2 build with gcc. Note: in glext.h the prototypes for glShaderSource() and glShaderSourceARB() disagree: only the former has the extra const qualifier. Reviewed-by: José Fonseca <[email protected]>
* mesa: make _mesa_reference_array_object() an inline functionBrian Paul2012-06-272-6/+17
| | | | As we do for texture objects, buffer objects, etc.
* mesa: look up enum name for glEnable/Disable errorsBrian Paul2012-06-271-5/+6
|
* mesa: move TEXGEN defines closer to gl_texgen structBrian Paul2012-06-271-40/+40
|
* mesa: rename ColorMaterialBitmask to _ColorMaterialBitmaskBrian Paul2012-06-273-7/+7
| | | | Since it's a derived field.
* mesa: re-order, update comments on lighting-related structsBrian Paul2012-06-271-25/+25
|
* mesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a fileBrian Paul2012-06-251-2/+12
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* glsl: Add IsCentroid bitfield to gl_fragment_program.Paul Berry2012-06-251-0/+6
| | | | | | | | | This bitfield tells the back-ends which of a fragment shader's inputs require centroid interpolation. It is only set for GLSL fragment shaders, since assembly fragment shaders don't support centroid interpolation. Reviewed-by: Eric Anholt <[email protected]>
* mesa: #define fprintf to be __mingw_fprintf() on Mingw32Brian Paul2012-06-221-0/+10
| | | | | | So that formats such as "%llx" are understood. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: minor transform feedback commentsBrian Paul2012-06-221-0/+2
|
* mesa: fix comments on UBO buffer binding functionsBrian Paul2012-06-221-4/+7
| | | | The old comments were for transform feedback.
* mesa: set GL_ARB_uniform_buffer_object extension year to 2009Brian Paul2012-06-211-1/+1
|
* mesa: Add a comment explaining my thoughts on glBindBufferBase().Eric Anholt2012-06-211-0/+26
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.Eric Anholt2012-06-211-0/+24
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getintegeri_v. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for glBindBufferBase/Range on GL_UNIFORM_BUFFER.Eric Anholt2012-06-211-0/+85
| | | | | | | | | | | | Fixes piglits: GL_ARB_uniform_buffer_object/bindbuffer-general-point. GL_ARB_uniform_buffer_object/negative-bindbuffer-buffer GL_ARB_uniform_buffer_object/negative-bindbuffer-index GL_ARB_uniform_buffer_object/negative-bindbuffer-target GL_ARB_uniform_buffer_object/negative-bindbufferrange-range Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move glBindBufferBase and glBindBufferRange() to bufferobj.Eric Anholt2012-06-214-59/+103
| | | | | | | | | | | The rest of the TFB implementation remains in transformfeedback.c, and this will be shared with UBOs. v2: Move the size/offset checks shared with UBOs to common code as well. (Kenneth's review) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move buffer object dispatch setup to bufferobj.c.Eric Anholt2012-06-213-11/+21
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add indexed binding points for uniform buffer objects.Eric Anholt2012-06-212-0/+51
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for the GL_UNIFORM_BUFFER general binding point.Eric Anholt2012-06-213-0/+22
| | | | | | | Fixes piglit ARB_uniform_buffer_object/buffer-targets. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.Eric Anholt2012-06-213-0/+51
| | | | | | | Fixes piglit GL_ARB_uniform_buffer_object/minmax. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for GL_ARB_base_instanceFredrik Höglund2012-06-195-0/+60
| | | | Reviewed-by: Brian Paul <[email protected]>
* gles2: Add GL_NV_read_buffer extensionKristian Høgsberg2012-06-184-1/+36
| | | | | | | This lets us select the front buffer for reading under GLES2. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* get.c: Rename EXTRA_VERSION_ES2 to EXTRA_API_ES2Kristian Høgsberg2012-06-181-5/+5
| | | | | | | | This extra condition checks the API not the version of the API, so rename to reflect that. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: if AllocStorage doesn't choose a format, report FRAMEBUFFER_UNSUPPORTEDMarek Olšák2012-06-161-1/+10
| | | | | | | | | | | This allows drivers not to do any allocation in AllocStorage if the storage cannot be allocated because of an unsupported internalformat + samples combo. The little ugliness is that AllocStorage is expected to return TRUE in this case. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx/tests and mesa/tests: Update .gitignore files.Paul Berry2012-06-141-0/+2
| | | | | | | | | This patch updates .gitignore files to account for the new build artifacts introduced by the following commits: ae376f0 glx/tests: Rename test as glx-test 8fecdcc mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions a29ad2b mesa/tests: Add tests for the generated dispatch table
* mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functionsIan Romanick2012-06-132-0/+1873
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: move variable declaration out of loop to fix MSVC buildBrian Paul2012-06-121-1/+2
|
* mesa: Free uniforms correclty.Antoine Labour2012-06-121-1/+2
| | | | | | | | This is an array of uniforms, not a single one. Reviewed-by: Ian Romanick <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.Kenneth Graunke2012-06-111-0/+4
| | | | | | | | Fixes oglconform's tbo/basic.buffer.delete test. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Make glPrimitiveRestartIndex execute immediately in display lists.Kenneth Graunke2012-06-111-0/+3
| | | | | | | | | | | | | | | From the GL_NV_primitive_restart spec: "PrimitiveRestartIndexNV is not compiled into display lists, but is executed immediately." Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop dispatch stub. +2 oglconforms. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Check for a negative "size" parameter in glCopyBufferSubData().Kenneth Graunke2012-06-111-0/+6
| | | | | | | | | | | | | | From the GL_ARB_copy_buffer spec: "An INVALID_VALUE error is generated if any of readoffset, writeoffset, or size are negative [...]" Fixes oglconform's copybuffer/negative.CNNegativeValues test. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix "glCopyBuffserSubData" typos in error messages and comments.Kenneth Graunke2012-06-081-10/+10
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Scaffolding for ARB_shader_bit_encoding.Olivier Galibert2012-06-073-0/+3
| | | | | | | | That adds support for activating the extension. It doesn't actually *do* anything yet, of course. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Return 8 bits for GL_TEXTURE_RED_SIZE on RGTC formats.Kenneth Graunke2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | From the issues section of the GL_ARB_texture_compression_rgtc extension: 15) What should glGetTexLevelParameter return for GL_TEXTURE_GREEN_SIZE and GL_TEXTURE_BLUE_SIZE for the RGTC1 formats? What should glGetTexLevelParameter return for GL_TEXTURE_BLUE_SIZE for the RGTC2 formats? RESOLVED: Zero bits. These formats always return 0.0 for these respective components and have no bits devoted to these components. Returning 8 bits for red size of RGTC1 and the red and green sizes of RGTC2 makes sense because that's the maximum potential precision for the uncompressed texels. Thus, we need to return 8 bits for GL_TEXTURE_RED_SIZE on all RGTC formats and 8 bits for GL_TEXTURE_GREEN_SIZE on RGTC2 formats. BLUE should be 0. Fixes oglconform/rgtc/advanced.texture_fetch.tex_param. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: consolidate internal glCompressedTexSubImage1/2/3D codeBrian Paul2012-06-064-126/+34
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexImage1/2/3D codeBrian Paul2012-06-064-125/+31
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCopyTexSubImage1/2/3D codeBrian Paul2012-06-062-52/+14
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexSubImage1/2/3D codeBrian Paul2012-06-065-125/+31
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexImage1/2/3D codeBrian Paul2012-06-065-176/+41
| | | | | | | The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Unbind ARB_transform_feedback2 binding points on Delete too.Kenneth Graunke2012-06-051-1/+7
| | | | | | | | | | | | DeleteBuffer needs to unbind from these binding points as well, based on the same rationale as the previous patch. +51 oglconforms (together with the last patch). NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Support BindBuffer{Base,Offset,Range} with a buffer of 0.Kenneth Graunke2012-06-051-3/+18
| | | | | | | | | | | | | _mesa_lookup_bufferobj returns NULL for 0, which caused us to say "there's no such buffer object" and raise an error, rather than correctly binding the shared NullBufferObj. Now you can unbind your buffers. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.Kenneth Graunke2012-06-051-0/+13
| | | | | | | | | | | | | | | | | According to the GL 3.1 spec, section 2.9 ("Buffer Objects"): "If a buffer object is deleted while it is bound, all bindings to that object in the current context (i.e. in the thread that called DeleteBuffers) are reset to zero." The code already checked for a number of cases, but neglected these newer binding points. +21 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Restore depth texture state on glPopAttrib(GL_TEXTURE_BIT).Kenneth Graunke2012-06-021-0/+8
| | | | | | | | | | | | | | | | | | According to Table 6.17 in the GL 2.1 specification, DEPTH_TEXTURE_MODE, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC need to be restored on glPopAttrib(GL_TEXTURE_BIT). Makes a number of oglconform tests happier. v2: Make restoration conditional on the ARB_shadow and ARB_depth_texture extensions, as suggested by Brian. I'm not sure that any implementations still remain that don't support those, but why not? NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove the generated glapi from source control, and just build it.Eric Anholt2012-05-294-25414/+3
| | | | | | | | | | | Mesa already always depends on python to build. The checked in changes are not reviewed (because any trivial change rewrites the world). We also have been pushing commits between xml change and regen where at-build-time xml-generated code disagrees with committed xml-generated code. And worst of all, sometimes we ("I") check in *stale* xml-generated code. Acked-by: Ian Romanick <[email protected]>