summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: glGet: fix indentation of _mesa_init_get_hashImre Deak2012-09-111-9/+9
| | | | | | | No functional change. Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix proxy texture error handling in glTexStorage()Brian Paul2012-09-111-37/+41
| | | | | | | | | This is basically a follow-on to 1f5b1f98468d5e80be39e619ed15c422fbede8d3. Basically, generate GL errors for ordinary invalid parameters for proxy targets the same as for non-proxy targets. Only texture size and OOM errors should be handled specially for proxies. Note: This is a candidate for the stable branches.
* mesa: make _mesa_get_proxy_target() non-staticBrian Paul2012-09-112-6/+8
| | | | | | Needed for the next patch. Note: This is a candidate for the stable branches.
* mesa: do internal format error checking for glTexStorage()Brian Paul2012-09-111-0/+48
| | | | | | | | Turns out we weren't doing any format checking before. Now check the internal format and, in particular, make sure that unsized internal formats aren't accepted. Note: This is a candidate for the stable branches.
* mesa/msaa: Allow X and Y flips in multisampled blits.Paul Berry2012-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the GL 4.3 spec, section 18.3.1 "Blitting Pixel Rectangles": If SAMPLE_BUFFERS for either the read framebuffer or draw framebuffer is greater than zero, no copy is performed and an INVALID_OPERATION error is generated if the dimensions of the source and destination rectangles provided to BlitFramebuffer are not identical, or if the formats of the read and draw framebuffers are not identical. It is not clear from the spec whether "dimensions" should mean both sign and magnitude, or just magnitude. Previously, Mesa interpreted "dimensions" as meaning both sign and magnitude, so any multisampled blit that attempted to flip the image in the X and/or Y direction would fail. However, Y flips are likely to be commonplace in OpenGL applications that have been ported from DirectX applications, as a result of the fact that DirectX and OpenGL differ in their orientation of the Y axis. Furthermore, at least one commercial driver (nVidia) permits Y filps, and L4D2 relies on them being permitted. So it seems prudent for Mesa to permit them. This patch changes Mesa to allow both X and Y flips, since there is no language in the spec to indicate that X and Y flips should be treated differently. NOTE: This is a candidate for stable release branches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: bump version to 9.1 (devel)Andreas Boll2012-09-091-2/+2
| | | | | | | Now that branch 9.0 is created, bump the minor version in master. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise GLES extensions in GL contextsChad Versace2012-09-061-5/+6
| | | | | | | | | | | | glGetStringi(GL_EXTENSIONS) failed to respect the context's API, and so returned all internally enabled GLES extensions from a GL context. Likewise, glGetIntegerv(GL_NUM_EXTENSIONS) also failed to repsect the context's API. Note: This is a candidate for the 8.0 and 9.0 branches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-058-30/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-0524-95/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* Use the correct macro _WIN32 for Windows.Vinson Lee2012-09-052-4/+4
| | | | | | | | | | | | | | The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove #undef CONST in get.cBrian Paul2012-09-051-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: remove now unused CONST macroBrian Paul2012-09-051-11/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: fix per-level max texture size error checkingBrian Paul2012-09-051-15/+21
| | | | | | | | | | | | | This is a long-standing omission in Mesa's texture image size checking. We need to take the mipmap level into consideration when checking if the width, height and depth are too large. Fixes the new piglit max-texture-size-level test. Thanks to Stéphane Marchesin for finding this problem. Note: This is a candidate for the stable branches. Reviewed-by: Michel Dänzer <[email protected]>
* mesa: fix DIFFERENT_SIGNS() functionBrian Paul2012-09-041-1/+1
| | | | | | | | | | Looks like converting this to a macro, returning bool, caused us to lose the high (31st) bit result. Fixes piglit fbo-1d test. Strange that none of the other tests I ran caught this. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54365 Tested-by: Vinson Lee <[email protected]>
* mesa: add missing return statements after recording errorsBrian Paul2012-09-031-0/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove more null pointer checks before free() callsBrian Paul2012-09-033-20/+14
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove null pointer checks before free() callsBrian Paul2012-09-031-44/+24
| | | | | | | Since free(NULL) is fine. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.Brian Paul2012-09-033-15/+13
| | | | | | | We were already defining sqrtf where we don't have the C99 version. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove accidentally committed __SUNPRO_C sqrtf() codeBrian Paul2012-09-031-4/+0
|
* mesa: s/FREE/free/Brian Paul2012-09-016-31/+31
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: s/CALLOC/calloc/Brian Paul2012-09-012-2/+2
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: s/MALLOC/malloc/Brian Paul2012-09-014-11/+11
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: clean-up LOG2() functionBrian Paul2012-09-011-18/+16
|
* mesa: move IS_NEGATIVE() and DIFFERENT_SIGNS() to macros.hBrian Paul2012-09-012-29/+32
|
* mesa: clean up F_TO_I, IFLOOR, ICEIL functionsBrian Paul2012-09-011-60/+30
| | | | Put all the #ifdef stuff inside the function bodies instead of outside.
* mesa: don't wait in _mesa_ClientWaitSync if timeout is 0Vadim Girlin2012-09-011-2/+6
| | | | | | | | | | | | | | From ARB_sync spec: If the value of <timeout> is zero, then ClientWaitSync does not block, but simply tests the current state of <sync>. TIMEOUT_EXPIRED will be returned in this case if <sync> is not signaled, even though no actual wait was performed. Fixes random fails of the arb_sync-timeout-zero piglit test on r600g. Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix-up and use _mesa_delete_renderbuffer()Brian Paul2012-08-311-1/+5
| | | | | | | | _mesa_delete_renderbuffer() should free the mutex (though that may be a no-op) and then free the renderbuffer object itself. Subclasses of gl_renderbuffer can use this function too. Reviewed-by: José Fonseca <[email protected]>
* mesa: Bump version to 9.0Ian Romanick2012-08-301-3/+3
| | | | | | | | Now that OpenGL 3.1 is supported by at least one driver, follow tradition and bump the major version number. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* meta: remove call to _meta_in_progress(), fix multisample enable/disableBrian Paul2012-08-301-6/+1
| | | | | | | | | | | | | | | | | | | This partially reverts d638da23d2ec2e9c52655b1ea138249e7f8bcccb. With gallium the meta code is not always built so the call to _meta_in_progress() was unresolved. Simply special-case the GL_MULTISAMPLE case in the meta code. There might be other special cases in the future given all the differences between legacy GL, core GL, GLES, etc. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54234 and https://bugs.freedesktop.org/show_bug.cgi?id=54239 v2 (Paul Berry <[email protected]>): keep _meta_in_progress function, since it's needed by the i965 driver, but don't call it from core mesa. Signed-off-by: Brian Paul <[email protected]>
* mesa: Do something sensible when on-line compression is requested but not ↵Ian Romanick2012-08-291-0/+31
| | | | | | | | | | | | | | | | | | | | | possible It is possible to force S3TC extensions to be enabled. This is generally done to support applications that will only supply pre-compressed textures. This accounts for the vast majority of applications. However, there is still the possibility of an application asking for on-line compression. In that case, generate a warning and substitute a generic compressed format. The driver will either pick an uncompressed format or a compressed format that Mesa can handle on-line (e.g., FXT1). This should only cause problems for applications that request on-line compression and read the compressed texture back. This is likely an infinitesimal subset of an already infinitesimal subset. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es: Enable GL_OES_vertex_array_objectIan Romanick2012-08-293-13/+10
| | | | | | | Functionally the same as GL_ARB_vertex_array_object. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Enable GL_{ARB,APPLE}_vertex_array_object in all driversIan Romanick2012-08-294-10/+3
| | | | | | | | This is a purely software extension. The drivers don't need to do any work to support it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Disallow alpha, luminance, and LA textures in core contextIan Romanick2012-08-291-4/+6
| | | | | | Also disallow the 1, 2, 3, and 4 formats. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Disallow more deprecated functions in core contextIan Romanick2012-08-292-3/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Require names from Gen in core contextIan Romanick2012-08-292-0/+9
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Allow NULL vertex pointer without a VBOIan Romanick2012-08-291-4/+13
| | | | | | | There is text in the OpenGL 3.x specs to explicitly allow this case. Weird. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Disallow VertexAttribPointer without a VAO in a core contextIan Romanick2012-08-291-0/+17
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Disallow wide lines in forward compatible contextIan Romanick2012-08-291-0/+17
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Only FRONT_AND_BACK is allowed for PolygonMode in core contextIan Romanick2012-08-291-0/+8
| | | | | | | | | | | | | Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says (in the list of deprecated functionality): "Separate polygon draw mode - PolygonMode face values of FRONT and BACK; polygons are always drawn in the same mode, no matter which face is being rasterized." Also modify meta to not use FRONT or BACK in a core context. Signed-off-by: Ian Romanick <[email protected]>
* meta: Don't stray outside the confines of the API specified in the contextPaul Berry2012-08-291-1/+7
| | | | | Signed-off-by: Paul Berry <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* mesa: Don't allow display lists or evaluators in core contextIan Romanick2012-08-292-3/+7
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Don't allow GL_EXTENSIONS query in core contextIan Romanick2012-08-291-0/+4
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Non-sprite points are deprecatedIan Romanick2012-08-291-1/+13
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Fix VAO deletion on GL 3.1 core.Eric Anholt2012-08-291-1/+1
| | | | | | We were calling through a dispatch table entry that was NULL, since the apple variant is only on legacy desktop. Just call the function we mean instead of indirecting through the dispatch.
* mesa: Enable a bunch of missing getters on 3.1 core.Eric Anholt2012-08-291-1/+1
| | | | NOTE: maybe I enabled too many?
* mesa: Expose texture buffer objects when the context is GL 3.1 core.Eric Anholt2012-08-292-10/+18
| | | | | | | | | | | v2: Use API_OPENGL_CORE. v3: Only require desktop GL. If a driver can't support TexBOs in a non-core context, it should not enable them. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Allow PACK / UNPACK queries for ES2Ian Romanick2012-08-291-9/+9
| | | | | | These are part of the GL_EXT_unpack_subimage extension and ES 3.0. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Kill ES2 wrapper functionsIan Romanick2012-08-294-117/+205
| | | | | | | | | v2: Fix completely broken condition around ClearColorIiEXT and ClearColorIuiEXT. v3: Add special VertexAttrib handling for ES2. Signed-off-by: Ian Romanick <[email protected]>
* mesa: glGetVertexAttribPointerv is part of core profile and ES2Ian Romanick2012-08-291-1/+1
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glPointParameter pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-25/+1
| | | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>