summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Replace VersionMajor/VersionMinor with a Version field.Eric Anholt2012-08-0710-44/+48
| | | | | | | | | | | As we get into supporting GL 3.x core, we come across more and more features of the API that depend on the version number as opposed to just the extension list. This will let us more sanely do version checks than "(VersionMajor == 3 && VersionMinor >= 2) || VersionMajor >= 4". v2: Fix a bad <= 30 check. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix default_access_mode() result for ES2Brian Paul2012-08-021-1/+1
| | | | | | | The GL_OES_mapbuffer extension is supported by OpenGL ES 1 and ES 2 so return GL_MAP_WRITE_BIT for both ES versions, not just ES 1. Reviewed-by: Ian Romanick <[email protected]>
* mesa: default_access_mode() returns a GLbitfield, not GLenumBrian Paul2012-08-021-1/+1
|
* mesa: Allow meta module to call sampler functionsPauli Nieminen2012-08-012-4/+15
| | | | | | | | | To allow meta module to use sample objects mesa GL functions need to be visible and linkable for meta module. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Make ARB_sampler_objects mandatoryPauli Nieminen2012-08-014-9/+3
| | | | | | | | | | | To allow meta acceleration operations to use sampler objects the ARB_sampler_objects extension needs to be mandatory for all drivers. Because the extension doesn't have any hardware dependencies it is trivial to implement. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/ff_shader: Fix sampler state readingPauli Nieminen2012-08-011-1/+4
| | | | | | | | | | | Fixed function fragment shader generator was incorrectly read texture sampling state directly from texture object. To make sure that ARB_sampler_object works correctly shader generator has to use the bound sampler if one exist. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/samplerobj: Support EXT_texture_sRGB_decodePauli Nieminen2012-08-011-0/+55
| | | | | | | | | | | | | | | | | | | | sRGBDecode state is part of sampler object state but mesa was missing handlers to access the state. This patch adds the support for required state changes and queries. GL_EXT_texture_sRGB_decode issue 4: "4) Should we add forward-looking support for ARB_sampler_objects? RESOLVED: YES If ARB_sampler_objects exists in the implementation, the sampler objects should also include this parameter per sampler." Fixes piglit GL_ARB_sampler_objects/GL_EXT_texture_sRGB_decode. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Move DepthMode to texture objectPauli Nieminen2012-08-016-13/+10
| | | | | | | | | | | | | | | | | | | | | | | GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_FILTER, TEXTURE_BORDER_COLOR, TEXTURE_MIN_- LOD, TEXTURE_MAX_LOD, TEXTURE_LOD_BIAS, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC. Texture state listed in table 6.25 but not listed here and in the sampler state in table 6.26 is not part of the sampler state, and remains in the texture object." The list of states is in Table 6.24 "Textures (state per texture object)" instead of 6.25 mentioned in the specification text. Same can be found from 3.3 compatibility specification. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Return -1 for glGetUniformLocation on UBOs.Eric Anholt2012-07-311-0/+10
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getuniformlocation. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for GL_ARB_ubo's glGetActiveUniformName().Eric Anholt2012-07-311-0/+39
| | | | | | | | | | | | This is like a stripped-down version of glGetActiveUniform that just returns the name, since the other return values (type and size) of that function are now meant to be handled with glGetActiveUniformsiv(). Fixes piglit ARB_uniform_buffer_object/getactiveuniformname Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for most of the other pnames of glGetActiveUniformBlockiv().Eric Anholt2012-07-311-0/+30
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for getting active uniform block names.Eric Anholt2012-07-311-0/+47
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getactiveuniformblockname. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glUniformBlockBinding() and the API to get it back.Eric Anholt2012-07-311-0/+95
| | | | | | | Fixes piglit ARB_uniform_buffer_object/uniformbufferbinding. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glGetProgramiv pnames for UBOs.Eric Anholt2012-07-311-0/+29
| | | | | | | | | | Fixes piglit ARB_uniform_buffer_object/getprogramiv. v2: Add extension checks. v3: Appease MSVC. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Support glGetString(GL_SHADING_LANGUAGE_VERSION) for >= 1.40.Kenneth Graunke2012-07-311-0/+10
| | | | | | | | | This will need to get refactored when we add support for core profiles or forward-compatible contexts, but we may as well have it in the meantime. This allows us to override the GLSL version and experiment. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: don't enable legacy GL functions when using API_OPENGL_COREJordan Justen2012-07-304-167/+232
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-3011-19/+29
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add api check functionsJordan Justen2012-07-301-0/+20
| | | | | | | | | These functions make it easier to check for multiple API types. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add API_OPENGL_CORE apiJordan Justen2012-07-301-2/+3
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove _math_matrix_alloc_inv()Brian Paul2012-07-261-3/+1
| | | | | | | Always allocate space for the inverse matrix in _math_matrix_ctr() since we were always calling _math_matrix_alloc_inv() anyway. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make more consistent use of _mesa_is_{user,winsys}_fbo()Paul Berry2012-07-264-9/+13
| | | | | | | | | | A lot of code was still differentiating between between winsys and user fbos by testing the fbo's name against zero. This converts everything in core mesa, the state tracker, and src/mesa/program over to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* msaa: Compute visual samples/sampleBuffers from all buffers.Paul Berry2012-07-241-2/+7
| | | | | | | | | This patch ensures that Visual.samples and Visual.sampleBuffers are set correctly even in the case where there is no color buffer. Previously, these values would retain their default value of 0 in this circumstance, even if the depth or stencil buffer was multisampled. Reviewed-by: Chad Versace <[email protected]>
* Fix compile time errors when building against uclibcAnthony G. Basile2012-07-241-1/+1
| | | | | | | | | | Mesa misses a few checks when compiling on a uclibc system which cause it to fall back on glibc-ism. This patch addresses those issues. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Anthony G. Basile <[email protected]>
* mesa context: generate an error for uninstalled context functionsJordan Justen2012-07-241-1/+4
| | | | | | | | | | | | | For 'non-legacy' contexts we will want to generate an error if an uninstalled function is called. The effect of this change will be that we can avoid installing legacy functions, and they will then generate an error as needed for deprecated functions in GL >= 3.1. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: improve comment in build_tnl_program()Brian Paul2012-07-241-1/+1
|
* mesa: move _mesa_error_check_format_and_type() to glformats.cBrian Paul2012-07-244-371/+371
| | | | | Now all the format/type-related helper functions are in glformats.c and image.c is just image-related functions.
* mesa: move more format helper functions to glformats.cBrian Paul2012-07-2410-389/+391
|
* mesa: move some format helper functions to glformats.cBrian Paul2012-07-245-420/+422
|
* mesa: fix format checking when doing a multisample resolveMarek Olšák2012-07-231-1/+111
| | | | | | v2: make it more bullet-proof Reviewed-by: Brian Paul <[email protected]>
* mesa: Prevent repeated glDeleteShader() from blowing away our refcounts.Kenneth Graunke2012-07-221-3/+5
| | | | | | | | | | | | | | | | | | | Calling glDeleteShader() should mark shaders as pending for deletion, but shouldn't decrement the refcount every time. Otherwise, repeated glDeleteShader() is not safe. This is particularly bad since glDeleteProgram() frees shaders: if you first call glDeleteShader() on the shaders attached to the program (thus decrementing the refcount), then called glDeleteProgram(), it would try to free them again (decrementing the refcount another time), causing a refcount > 0 assertion to fail. Similar to commit d950a778. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* imports.h: Correct ceilf typo.Matt Turner2012-07-221-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa formats: add MESA_FORMAT_ABGR2101010_UINTJordan Justen2012-07-216-0/+147
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa formats: unpack ARGB8888/XRGB8888Jordan Justen2012-07-211-0/+34
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa pack: use _mesa_problem instead of assertJordan Justen2012-07-212-8/+18
| | | | | | | | If the pack type is not supported, use _mesa_problem rather than asserting. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add glformats integer type/format detection routinesJordan Justen2012-07-2110-93/+291
| | | | | | | | | | | | _mesa_is_integer_format is moved to formats.c and renamed as _mesa_is_enum_format_integer. _mesa_is_format_unsigned, _mesa_is_type_integer, _mesa_is_type_unsigned, and _mesa_is_enum_format_or_type_integer are added. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Remove unused _mesa_memset16Matt Turner2012-07-212-16/+0
| | | | | | | Unused since commit fd104a845. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Remove _mesa_inv_sqrtf in favor of 1/SQRTFMatt Turner2012-07-212-114/+1
| | | | | | | | Except for a couple of explicit uses, _mesa_inv_sqrtf was disabled since its addition in 2003 (see f9b1e524). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Remove _mesa_sqrt* in favor of plain sqrtMatt Turner2012-07-213-117/+1
| | | | | | | | | | Temporarily disabled since 2003 (see 386578c5b). This saves us from calling sqrt() 128 times to generate the sqrttab in one_time_init(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: disable MSVC global optimization in pack.cJosé Fonseca2012-07-201-0/+13
| | | | | | | | To reduce excessive compilation time in release mode. NOTE: This is a candidate for the 8.0 branch. Tested-by: Brian Paul <[email protected]>
* mesa: whitespace fixes in pbo.cBrian Paul2012-07-201-14/+14
|
* mesa: update texstore.c commentBrian Paul2012-07-201-3/+2
|
* mesa: Implement the UBO-specific pnames of glGetActiveUniformsiv.Eric Anholt2012-07-201-2/+13
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add implementation of glGetUniformBlockIndex().Eric Anholt2012-07-201-0/+27
| | | | | | | | | Now that we finally have a list of uniform blocks in the linked shader program, we can tell what their indices are. Fixes piglit GL_ARB_uniform_buffer_object/getuniformblockindex. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glGetActiveUniformsiv on non-UBO pnames.Eric Anholt2012-07-203-0/+70
| | | | | | | We'll need to propagate the UBO fields to the uniform storage records before we can handle the other pnames. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glGetUniformIndices().Eric Anholt2012-07-201-0/+35
| | | | | | | | | This is a single entrypoint that maps from a series of names to the indices of those names within the active uniforms list. Each index is like glGetUniformLocation()'s return value, except that it doesn't encode an array offset. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Move the _mesa_uniform_merge_location_offset to glGetUniformLocation().Eric Anholt2012-07-203-13/+23
| | | | | | | With the upcoming GL_ARB_uniform_buffer_object changes, the only other caller that will want the cooked value is state_tracker. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Merge the lists of uniform blocks into the linked shader program.Eric Anholt2012-07-201-0/+34
| | | | | | This attempts error-checking, but the layout isn't done yet. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Translate the AST for uniform blocks into some IR structures.Eric Anholt2012-07-201-0/+18
| | | | | | | | | | We're going to need this structure to cross-validate the uniform blocks between shader stages, since unused ir_variables might get dropped. It's also the place we store the RowMajor qualifier, which is not part of the GLSL type (since that would cause a bunch of type equality checks to fail). Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add UsesDFdy to struct gl_fragment_program.Paul Berry2012-07-191-0/+1
| | | | | | | | | | | | The i965 back-end needs to compile dFdy() differently for FBOs and window system framebuffers, because Y coordinates are flipped between the two (see commit 82d2596: i965: Compute dFdy() correctly for FBOs). This boolean will allow it to avoid unnecessarily recompiling shaders that don't use dFdy(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove stale commentBrian Paul2012-07-181-1/+0
|