aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Remove the OES_draw_texture extension from ES2.Kenneth Graunke2012-05-231-1/+1
| | | | | | | | | This extension appears to be written against ES 1.0. In ES 2.0, you really want to be using FBOs instead. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Use initializers to configure samplersIan Romanick2012-05-231-32/+9
| | | | | | | | | Now that the linker handles initializers of samplers just like any other uniform, a bunch of this annoying code is unnecessary. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Initialize samplers to 0, propagate sampler values to the gl_programIan Romanick2012-05-231-0/+1
| | | | | | | | | | | | | The spec requires that samplers be initialized to 0. Since this differs from the 1-to-1 mapping of samplers to texture units assumed by ARB assembly shaders (and the gl_program structure), be sure to propagate this date from the gl_shader_program to the gl_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> CC: Vadim Girlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49088
* mesa: Keep a computed value for dual source blend func with each buffer.Eric Anholt2012-05-233-17/+32
| | | | | | | | | The i965 driver needed this as well for hardware setup, so instead of duplicating the logic, just save it off. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: use F_TO_I() instead of IROUND()Brian Paul2012-05-193-120/+120
| | | | | | | | Use it where performance matters more and the exact method of float->int conversion/rounding isn't terribly important. There should no net change here since F_TO_I() is the new name of the old IROUND() function. Reviewed-by: José Fonseca <[email protected]>
* mesa: reimplement IROUND(), add F_TO_I()Brian Paul2012-05-191-21/+36
| | | | | | | | | | | | | | The different implementations of IROUND() behaved differently and in the case of fistp, depended on the current x86 FPU rounding mode. This caused some tests like piglit roundmode-pixelstore and roundmode-getintegerv to fail on 32-bit x86 but pass on 64-bit x86. Now IROUND() always rounds to the nearest integer (away from zero). The new F_TO_I function converts a float to an int by whatever means is fastest. We'll use this where we're more concerned with performance and not too worried to how the conversion is done. Reviewed-by: José Fonseca <[email protected]>
* mesa: fix Z32_FLOAT -> uint conversion functionsBrian Paul2012-05-191-2/+2
| | | | | | | | The IROUND converted all arguments to 0 or 1. That's not what we wanted. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: add GLSL_REPORT_ERRORS debug flagBrian Paul2012-05-192-0/+15
| | | | | | | If the MESA_GLSL env var contains "errors", GLSL compilation and link errors will be reported to stderr. Reviewed-by: Ian Romanick <[email protected]>
* mesa: add some comments on shaderapi.c functionsBrian Paul2012-05-191-1/+14
|