summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: don't enable glVertexPointer() when using API_OPENGLES2.Paul Berry2012-10-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This function is only present in GLES1 and in the OpenGL compatibility profile. Fixes the following "make check" failure: [----------] 1 test from DispatchSanity_test [ RUN ] DispatchSanity_test.GLES2 Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable dispatch_sanity.cpp:122: Failure Value of: table[i] Actual: 0x4de54e Expected: (_glapi_proc) _mesa_generic_nop Which is: 0x41af72 i = 321 [ FAILED ] DispatchSanity_test.GLES2 (4 ms) [----------] 1 test from DispatchSanity_test (4 ms total) NOTE: This is a candidate for stable release branches. Reviewed-by: Oliver McFadden <[email protected]> Tested-by: Oliver McFadden <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: don't call TexImage driver hooks for zero-sized imagesBrian Paul2012-10-041-7/+9
| | | | | | | This simply avoids some failed assertions but there's no reason to call the driver hooks for storing a tex image if its size is zero. Note: This is a candidate for the stable branches.
* mesa: tests: EnumStrings.LookUpByNumberOliver McFadden2012-10-031-2/+2
| | | | | | | | | | | | | | | | | | [ RUN ] EnumStrings.LookUpByNumber enum_strings.cpp:43: Failure Value of: _mesa_lookup_enum_by_nr(everything[i].value) Actual: "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE" Expected: everything[i].name Which is: "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT" enum_strings.cpp:43: Failure Value of: _mesa_lookup_enum_by_nr(everything[i].value) Actual: "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE" Expected: everything[i].name Which is: "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT" [ FAILED ] EnumStrings.LookUpByNumber (2 ms) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55505 Signed-off-by: Oliver McFadden <[email protected]>
* mesa: remove bogus compressed texture size checksBrian Paul2012-10-022-28/+0
| | | | | | | | | | | | | | A compressed texture image size doesn't have to be a multiple of the compressed block size (only sub-images do). Fixes issues when building compressed mipmaps because we often wind up with non-block-size images for the higher mipmap levels. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=55445 Note: This is a candidate for the stable branches. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Sven Arvidsson <[email protected]>
* build: Use PTHREAD_LIBS and PTHREAD_CFLAGSMatt Turner2012-10-011-1/+5
|
* intel: add support for ANGLE_texture_compression_dxt.Oliver McFadden2012-10-016-5/+32
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement BlitFramebuffer using gallium blitMarek Olšák2012-09-301-2/+2
| | | | | | | | This also fixes a lot tests, especially all the clip-and-scissor-blit MSAA piglit tests. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add fall-through comment, just to be clearBrian Paul2012-09-291-0/+1
|
* mesa: remove useless GLenum castsBrian Paul2012-09-291-2/+2
|
* mesa: add const qualifier in check_for_ending() to silence warningBrian Paul2012-09-291-1/+1
|
* mesa: allow MESA_GL_VERSION_OVERRIDE to override the API typeJordan Justen2012-09-283-20/+69
| | | | | | | | | | | | | | | | | | | Change the format to MAJOR.MINOR[FC] For example: 2.1, 3.0FC, 3.1 The FC suffix indicates a forward compatible context, and is only valid for versions >= 3.0. Examples: 2.1: GL Legacy/Compatibility context 3.0: GL Legacy/Compatibility context 3.0FC: GL Core Profile context + Forward Compatible 3.1: GL Core Profile context 3.1FC: GL Core Profile context + Forward Compatible Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* main/version: add "(Core Profile) to version string for core profilesJordan Justen2012-09-281-2/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/tests: Sanity check the ES2 dispatch tableIan Romanick2012-09-283-1/+313
| | | | | | | | | | | | | | | | | | | | | This test is only built when shared-glapi is used. Because of changes elsewhere in the tree that were necessary to make shared-glapi work correct with GLX, it's not feasible to make the test function both ways. The list of expected functions originally came from the functions set by api_exec_es2.c. This file no longer exists in Mesa (but api_exec_es1.c is still generated). It was the generated file that configured the dispatch table for ES2 contexts. This test verifies that all of the functions set by the old api_exec_es2.c (with the recent addition of VAO functions) are set in the dispatch table and everything else is a NOP. When adding ES2 (or ES3) extensions that add new functions, this test will need to be modified to expect dispatch functions for the new extension functions. v2: Expect VAO functions be non-NOP. Signed-off-by: Ian Romanick <[email protected]>
* mesa/main: Make no-op dispatch function publicIan Romanick2012-09-282-3/+5
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/tests: Move stub function to a separate fileIan Romanick2012-09-283-13/+49
| | | | | | | When building with shared-glapi, we can just use Mesa's _mesa_warning without problems. stubs.cpp is only used when shared-glapi is not used. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Don't set uniform dispatch pointers for many things in ES2 or coreIan Romanick2012-09-283-36/+39
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set shaderapi dispatch pointers for many things in ES2 or coreIan Romanick2012-09-284-22/+35
| | | | | | | | | | | | v2: Allow GL_ARB_shader_objects functions in core profile because we still expose the extension string there. Don't allow glBindFragDataLocation in GLES3 because it's not part of that API. Based (mostly) on review comments from Eric Anholt. NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set vtxfmt dispatch pointers for many things in ES2 or coreIan Romanick2012-09-281-53/+73
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set loopback dispatch pointers for most things in ES2 or coreIan Romanick2012-09-284-219/+228
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Pass GL context to _mesa_create_save_tableIan Romanick2012-09-283-3/+3
| | | | | | | | | | | This isn't used by this patch, but it will be necessary for several follow-on patches. Separating this out will make it easier to reorder patches later. NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glTexStorage in ES2Ian Romanick2012-09-281-4/+6
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glGetProgramivARB in ES2Ian Romanick2012-09-281-1/+1
| | | | | | | | | This function is not the same as glGetProgramiv. NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glResizeBuffersMESA in ES2Ian Romanick2012-09-281-1/+3
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointers for glPointParameter[if][v] in ES2Ian Romanick2012-09-281-4/+8
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointers for glClearDepth or glDepthRange in ES2Ian Romanick2012-09-281-2/+8
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glGetBufferSubData in ES2Ian Romanick2012-09-281-1/+3
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glGetDoublev in ES2Ian Romanick2012-09-281-1/+3
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't set dispatch pointer for glPointSize in ES2Ian Romanick2012-09-281-3/+1
| | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Set dispatch pointer for glShaderBinaryIan Romanick2012-09-281-0/+1
| | | | | | | NOTE: This is a candiate for stable branches Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Fix typo in error message.Vinson Lee2012-09-271-1/+1
| | | | Signed-off-by: Vinson Lee <[email protected]>
* mesa: move _mesa_es_error_check_format_and_type() to glformats.cBrian Paul2012-09-265-69/+73
| | | | | | Where the non-ES _mesa_error_check_format_and_type() function lives. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: move GL_HALF_FLOAT_OES definition to glheader.hBrian Paul2012-09-263-11/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: minor fix to glTexSubImage error messageBrian Paul2012-09-261-1/+2
|
* mesa: consolidate sub-texture error checking codeBrian Paul2012-09-261-168/+94
| | | | | | Do all error checking of glTexSubImage, glCopyTexSubImage and glCompressedTexSubImage's xoffset, yoffset, zoffset, width, height, and depth params in one place.
* mesa: consolidate glTexSubImage() error checkingBrian Paul2012-09-261-40/+38
|
* mesa: consolidate glCompressedTexSubImage() error checkingBrian Paul2012-09-261-77/+88
| | | | | Do all the checking in one function instead of two and fix up some of the error checking.alignment check
* mesa: consolidate subtexture xoffset/yoffset/width/height error checking codeBrian Paul2012-09-261-88/+73
| | | | | This is the code that checks if a subtexture region is aligned to the compressed format's block size.
* mesa: consolidate glCopyTexSubImage error checkingBrian Paul2012-09-261-79/+60
| | | | Do all the checking in one function instead of two.
* mesa: fix incorrect error for glCompressedSubTexImageBrian Paul2012-09-261-3/+3
| | | | | | | | | If a subtexture region isn't aligned to the compressed block size, return GL_INVALID_OPERATION, not gl_INVALID_VALUE. NOTE: This is a candidate for the stable branches. Reviewed-by: Eric Anholt <[email protected]>
* gles3: Prohibit set/get of GL_FRAMEBUFFER_SRGB.Paul Berry2012-09-252-2/+9
| | | | | | | | | | | | | | | | GLES 3 supports sRGB functionality, but it does not expose the GL_FRAMEBUFFER_SRGB enable/disable bit. Instead the implementation is expected to behave as though that bit is always enabled. This patch ensures that ctx->Color.sRGBEnabled (the internal variable tracking GL_FRAMEBUFFER_SRGB) is initially true in GLES 2/3 contexts, and that it cannot be modified through the GLES 3 API. This is safe for GLES 2, since ctx->Color.sRGBEnabled has no effect on non-sRGB formats, and GLES 2 doesn't support any sRGB formats. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* enable: Create _mesa_set_framebuffer_srgb() function for use by meta ops.Paul Berry2012-09-252-3/+22
| | | | | | | | | | | | | | | GLES3 supports sRGB formats, but it does not support the GL_FRAMEBUFFER_SRGB enable/disable flag (instead it behaves as if this flag is always enabled). Therefore, meta ops that need to disable GL_FRAMEBUFFER_SRGB will need a backdoor mechanism to do so when the API is GLES3. We were already doing a similar thing for GL_MULTISAMPLE, which has the same constraints. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: remove 'struct' from texenv_fragment_programBrian Paul2012-09-251-13/+13
| | | | | | texenv_fragment_program is declared as a class. Fixes warnings with MSVC. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add signbit() macroBrian Paul2012-09-241-0/+7
| | | | Reviewed-by: Matt Turner <[email protected]>
* Use signbit() in IS_NEGATIVE and DIFFERENT_SIGNSMatt Turner2012-09-241-19/+2
| | | | | | | | | | signbit() appears to be available everywhere (even MSVC according to MSDN), so let's use it instead of open-coding some messy and confusing bit twiddling macros. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54805 Reviewed-by: Paul Berry <[email protected]> Suggested-by: Ian Romanick <[email protected]>
* mesa: Silence narrowing warnings in ff_fragment_shader's emit_texenv().Kenneth Graunke2012-09-231-4/+4
| | | | | | | | | | | | | Recent version of GCC report a warning for the implicit conversion from int to float: ff_fragment_shader.cpp:897:3: warning: narrowing conversion of '(1 << ((int)rgb_shift))' from 'int' to 'float' inside { } is ill-formed in C++11 [-Wnarrowing] This is because floats cannot precisely represent all possible 32-bit integer values. However, texenv code is all expected to be floating point, so this should not be a problem. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Don't override S3TC internalFormat if data is pre-compressed.Kenneth Graunke2012-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 42723d88d intended to override an S3TC internalFormat to a generic compressed format when the application requested online compression of uncompressed data. Unfortunately, it also broke pre-compressed textures when libtxc_dxtn isn't installed but the extensions are forced on. Both glCompressedTexImage2D() and glTexImage2D() call teximage(), which calls _mesa_choose_texture_format(), hitting this override code. If we have actual S3TC source data, we can't treat it as any other format, and need to avoid the override. Since glCompressedTexImage2D() passes in a format of GL_NONE (which is illegal for glTexImage), we can use that to detect the pre-compressed case and avoid the overrides. Fixes a regression since 42723d88d370a7599398cc1c2349aeb951ba1c57. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-and-tested-by: Jordan Justen <[email protected]>
* mesa: Ignore SRGB when determining compatible resolve formats.Kenneth Graunke2012-09-201-1/+2
| | | | | | | | | | | | | | | MSAA resolves and other blit-like operations ignore SRGB state anyway, so we should be able to safely allow resolves between compatible SRGB/linear formats like SRGBA8 and RGBA8888. This matches the behavior of the nVidia and AMD binary drivers. Fixes completely black rendering when using multisampling in L4D2. NOTE: This is a candidate for the 9.0 branch. Reviewed-by: Paul Berry <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXTIan Romanick2012-09-201-0/+12
| | | | | | | | | This was already (correctly) supported for glGetSamplerParameter paths. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "mesa: consolidate subtexture x/y/width/height error checking code"Brian Paul2012-09-191-73/+84
| | | | | | This reverts commit 5b807400a87d5efefc481017eb420b772933e1da. accidentally pushed.
* Revert "more comment"Brian Paul2012-09-191-2/+4
| | | | | | This reverts commit 5205db6a7ce623a7fca72e6dc6391bd12be3f6aa. accidentally pushed