summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* mesa: use gl_program cast wrappersBrian Paul2012-07-185-32/+25
| | | | | | | In a few cases, remove unneeded casts. And fix a few other const-correctness issues. Reviewed-by: Kenneth Graunke <[email protected]>
* msaa: Generate proper error for operations prohibited on MSAA buffers.Paul Berry2012-07-172-3/+3
| | | | | | | | | | | | | | | | | | | | | From the GL 3.0 spec, section 4.3.3, in the documentation for CopyPixels(): "An INVALID_OPERATION error will be generated if the object bound to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value of SAMPLE_BUFFERS is greater than zero." The same applies to CopyTexImage...() and CopyTexSubImage...() functions, since they are defined in terms of CopyPixels(). Previously we were generating an INVALID_FRAMEBUFFER_OPERATION error in these cases. Fixes piglit tests "EXT_framebuffer_multisample/negative-{copypixels,copyteximage}". Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: include inttypes.h to get uint8_t typeBrian Paul2012-07-161-0/+1
| | | | To fix MSVC build.
* mesa: Add function for decoding ETC1 texturesChad Versace2012-07-162-0/+40
| | | | | | | | | Add function _mesa_etc1_unpack_rgba8888. It is intended to be used by glCompressedTexSubImage2D to decode ETC1 textures into RGBA. CC: Chia-I <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* gallium/util, mesa: Refactor etc1 unpack functionChad Versace2012-07-161-0/+34
| | | | | | | | | | Move the body of util_etc1_rgb8_unpack_rgba_unorm8 into a new function that can be shared between gallium and dri drivers, texcompress_etc_tmp.h:etc1_unpack_rgba8888. CC: Chia-I <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* automake: convert libmesa and libmesagalliumJon TURNEY2012-07-131-1/+1
| | | | | | | | | | | | | | | | | * "configure substitutions are not allowed in _SOURCES variables" in automake, so instead of MESA_ASM_FILES, use some AM_CONDITIONALS to choose which architecture's asm sources are used in libmesa_la_SOURCES. (Can't remove MESA_ASM_FILES autoconf variable as it's still used in sources.mak) * Update to link with the .la file in other Makefile.am files, and make a link to the .a file for the convenience of other Makefiles which have not yet been converted to automake v2: Remove stray -static from LDFLAGS v3: Remove .a compatibility link on clean Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* mesa,st/mesa: implement GL_RGB565 from ARB_ES2_compatibilityMarek Olšák2012-07-134-0/+23
| | | | | | | | | | This was not implemented, because the spec was changed just recently. Everything has been in place already. Gallium has PIPE_FORMAT_B5G6R5_UNORM, while Mesa has MESA_FORMAT_RGB565. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add ARB_transform_feedback_instanced extension enable flagMarek Olšák2012-07-122-0/+2
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement new DrawTransformFeedback functionsMarek Olšák2012-07-123-6/+29
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement display list support for new DrawTransformFeedback functionsMarek Olšák2012-07-122-0/+85
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement display list support for indexed query functionsMarek Olšák2012-07-121-2/+47
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement indexed query functions from ARB_transform_feedback3Marek Olšák2012-07-121-15/+67
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement glGet queries and error handling for ARB_transform_feedback3Marek Olšák2012-07-124-0/+43
| | | | Acked-by: Ian Romanick <[email protected]>
* glsl: implement ARB_transform_feedback3 in the linkerMarek Olšák2012-07-122-0/+2
| | | | Acked-by: Ian Romanick <[email protected]>