summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-07-20Apple: glFlush() is not needed with CGLFlushDrawable()9.0Jeremy Huddleston Sequoia1-2/+0
<rdar://problem/14496373> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit fa5ed99d8e809fb86e486a40273a4a6971055398)
2013-07-03i965: Fix validation of ETC miptrees.Eric Anholt1-5/+7
When comparing to the teximage's format, we have to look at the format-the-mt-was-created-for not the format-actually-stored-in-the-mt. Improves glbenchmark 2.1 offscreen test performance 159% +/- 17% (n=3). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54582 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 46386816a77c6e5751a0685776c0a6320f46f8fe) Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> The original patch needed some backporting for the old tree.
2013-06-26nvc0: set rsvd_kick correctlyMaarten Lankhorst1-0/+1
This prevents trampling beyond the end of the command stream during flushes. NOTE: This is a candidate for the stable branches. Reported-by: Christoph Bumiller <christoph.bumiller@speed.at> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> (cherry picked from commit e72cc26518d8a60093ac497bf680c1f4ba614fa9)
2013-05-31integer overflow in XF86DRIGetClientDriverName() [CVE-2013-1993 2/2]Alan Coopersmith1-3/+5
clientDriverNameLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. NOTE: This is a candidate for stable release branches. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 306f630e676eb901789dd09a0f30d7e7fa941ebe)
2013-05-31integer overflow in XF86DRIOpenConnection() [CVE-2013-1993 1/2]Alan Coopersmith1-1/+6
busIdStringLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. NOTE: This is a candidate for stable release branches. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 2e5a268f18be30df15aed0b44b01a18a37fb5df4)
2013-03-06i965: Add texrect scale parameters before pointers to ParameterValues.Eric Anholt3-0/+24
If adding scale parameters during program compile caused a realloc of ParameterValues, then the driver uniform storage set up by _mesa_associate_uniform_storage() would point to potentially freed memory. Note that this uses TexturesUsed, which may change at runtime for GLSL when sampler uniforms change. This is a flaw in our handling of texrect in general, and not one I'm fixing currently. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit ffdfafb06cf3ae468ceb3e504365016347f54bee) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47169
2013-02-27gbm: Remember to init format on gbm_dri_bo_create.Daniel van Vugt1-0/+2
https://bugs.freedesktop.org/show_bug.cgi?id=60143 (cherry picked from commit 6e226ab5ac7ee4e2cc5ecbc43731c1c2c9eadff4)
2013-02-21docs: add news item for 9.0.3 releaseAndreas Boll1-0/+8
2013-02-21docs: Add 9.0.3 release md5sumsAndreas Boll1-1/+3
2013-02-21docs: Add 9.0.3 release notesmesa-9.0.3Andreas Boll2-0/+238
2013-02-21mesa: Bump version to 9.0.3Andreas Boll4-5/+5
2013-02-21DRI2: Don't disable GLX_INTEL_swap_event unconditionallyZack Rusin1-3/+12
GLX_INTEL_swap_event is broken on the server side, where it's currently unconditionally enabled. This completely breaks systems running on drivers which don't support that extension. There's no way to test for its presence on this side, so instead of disabling it uncondtionally, just disable it for drivers which are known to not support it. It makes sense because most drivers do support it right now. We'll be able to remove this once Xserver properly advertises GLX_INTEL_swap_event. Note: This is a candidate for stable branch branches. Signed-off-by: Zack Rusin <zackr@vmware.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60052 Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 076403c30d9f5cc79374e30d9f6007b08a63bf2d)
2013-02-21i965/gen7: Set up all samplers even if samplers are sparsely used.Eric Anholt1-1/+1
In GLSL, sampler indices are allocated contiguously from 0. But in the case of ARB_fragment_program (and possibly fixed function), an app that uses texture 0 and 2 will use sampler indices 0 and 2, so we were only allocating space for samplers 0 and 1 and setting up sampler 0. We would read garbage for sampler 2, resulting in flickering textures and an angry simulator. Fixes bad rendering in 0 A.D. and ETQW. This was fixed for pre-gen7 by 28f4be9eb91b12a2c6b1db6660cca71a98c486ec Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25201 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58680 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> NOTE: This is a candidate for stable branches. (cherry picked from commit 5bb05c6e6d596d66c177e42a36128d2ca2e300aa)
2013-02-19i965/vs: Try again when we've successfully spilled a reg.Eric Anholt3-10/+16
Before, we'd spill one reg, then continue on without actually register allocating, then assertion fail when we tried to use a vgrf number as a register number. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit d4bcc6591812ebe72a363cf98371de5e5016f481) This should have been picked when 9237f0e was picked. Bugzill: https://bugs.freedesktop.org/show_bug.cgi?id=59700
2013-02-14nouveau: Fix build.Brian Paul1-1/+1
Fixes nouveau build failure introduced at c73245882c7ff1277b190b97f093f7b423a22f10. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57746 Signed-off-by: Vinson Lee <vlee@freedesktop.org> (cherry picked from commit a17750b6884939a36947c76a30d3077f1488f943)
2013-02-13i965: Fix the SF Vertex URB Read Length calculation for Gen7 platforms.Kenneth Graunke1-16/+16
Ivybridge doesn't appear to have the same errata as Sandybridge; no corruption was observed by setting it to more than the minimal correct value. It's possible that we were simply lucky, since the URB entries are 1024-bit on Ivybridge vs. 512-bit Sandybridge. Or perhaps the underlying hardware issue is fixed. Either way, we may as well program the minimum value since it's now readily available, likely to be more efficient, and possibly more correct. v2: Use GEN7_SBE_* defines rather than GEN6_SF_*. (A copy and paste mistake.) They're the same, but using the right names is better. Reviewed-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 44aa2e15f692965be76229e67f919bf967fc7d67)
2013-02-13i965: Fix the SF Vertex URB Read Length calculation for Sandybridge.Kenneth Graunke1-16/+18
(This commit message was primarily written by Paul Berry, who explained what's going on far better than I would have.) Previous to this patch, we thought that the only restrictions on 3DSTATE_SF's URB read length were (a) it needs to be large enough to read all the VUE data that the SF needs, and (b) it can't be so large that it tries to read VUE data that doesn't exist. Since the VUE map already tells us how much VUE data exists, we didn't bother worrying about restriction (a); we just did the easy thing and programmed the read length to satisfy restriction (b). However, we didn't notice this erratum in the hardware docs: "[errata] Corruption/Hang possible if length programmed larger than recommended". Judging by the context surrounding this erratum, it's pretty clear that it means "URB read length must be exactly the size necessary to read all the VUE data that the SF needs, and no larger". Which means that we can't program the read length based on restriction (b)--we have to program it based on restriction (a). The URB read size needs to precisely match the amount of data that the SF consumes; it doesn't work to simply base it on the size of the VUE. Thankfully, the PRM contains the precise formula the hardware expects. Fixes random UI corruption in Steam's "Big Picture Mode", random terrain corruption in PlaneShift, and Piglit's fbo-5-varyings test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56920 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60172 Tested-by: Jordan Justen <jordan.l.justen@intel.com> (v1/Piglit) Tested-by: Martin Steigerwald <martin@lichtvoll.de> (PlaneShift) Reviewed-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 09fbc298283b41cf3f25d75842a6d8ab4952dca1)
2013-02-13i965: Compute the maximum SF source attribute.Kenneth Graunke3-4/+12
The maximum SF source attribute is necessary to compute the Vertex URB read length properly, which will be done in the next commit. Reviewed-by: Paul Berry <stereotype441@gmail.com> Tested-by: Martin Steigerwald <martin@lichtvoll.de> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 5e9bc7bd1290b0c34be90e9a0b8298ebe4b4b131)
2013-02-13i965: Refactor Gen6+ SF attribute override code.Kenneth Graunke1-12/+13
The next patch will benefit from easy access to the source attribute number and whether or not we're swizzling. It doesn't want the final attr_override DWord form, however. Reviewed-by: Paul Berry <stereotype441@gmail.com> Tested-by: Martin Steigerwald <martin@lichtvoll.de> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit b3efc5bea85a84493a4b81eea0d3c3acfe42813f)
2013-02-13cherry-ignore: Ignore candidates for the 9.1 branch.Andreas Boll1-0/+17
2013-02-13softpipe: fix using optimized filter functionRoland Scheidegger1-0/+1
This optimized filter (when using repeat wrap modes, linear min/mag/mip filters, pot textures) only applies to 2d textures, but nothing prevented it from being used for other textures (likely leading to very bogus sample results). Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 66b6d5121475ecdd6b76ff660e28dfa6cc3f727c)
2013-02-13r300g: fix blending with blend color and RGBA formatsMarek Olšák1-0/+11
NOTE: This is a candidate for the stable branches. (cherry picked from commit f40a7fc34a601195191b1b2ffef55818a4086d5f)
2013-02-13svga: fix sRGB renderingBrian Paul1-0/+11
We weren't emitting the SVGA_RS_OUTPUTGAMMA state so sRGB rendering didn't work properly. Fixes piglit's framebuffer-srgb test. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit ff605091579a0dfbb6a6b3ea0e46d6fed28a278b)
2013-02-13mesa: don't expose IBM_rasterpos_clip in a core contextBrian Paul1-1/+1
glRasterPos doesn't exist in the core profile. NOTE: This is a candidate for the stable branches (9.0 and 9.1). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit cc5fdaf2dce4465b09653f4bf3113674fb346646) Conflicts: src/mesa/main/extensions.c
2013-02-13st/mesa: only enable GL_EXT_framebuffer_multisample if GL_MAX_SAMPLES >= 2Brian Paul1-1/+3
We never really have multisampling with one sample per pixel. See also http://bugs.freedesktop.org/show_bug.cgi?id=59873 Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit c80bacba2ed88bccc92ab7a7151e14ad32729249)
2013-02-13mesa: don't enable GL_EXT_framebuffer_multisample for software driversBrian Paul1-3/+0
Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 8f3c81d0182b10d99976dd0a80f10eebebf54017) Conflicts: src/mesa/main/extensions.c
2013-02-13gallium/u_upload_mgr: fix a serious memory leakMarek Olšák1-2/+1
It can eat all memory and crash in a matter of minutes with r600g. (cherry picked from commit 87592cff57feef29565150b9203e220b50623f30)
2013-02-13util: add new error checking code in vbuf helperBrian Paul1-28/+49
Check the return value of calls to u_upload_alloc() and u_upload_data() and return early if needed. Since we don't have a way to propagate errors all the way up to Mesa through pipe_context::draw_vbo(), call debug_warn_once() so the user might have some clue about OOM errors. Note: This is a candidate for the 9.0 branch. (cherry picked from commit b13c534f1479549e53b9896ea4d25d79f8466c24) Conflicts: src/gallium/auxiliary/util/u_vbuf.c
2013-02-13st/mesa: do proper error checking for u_upload_alloc() callsBrian Paul5-17/+26
We weren't properly checking the return value of these calls (and calls to u_upload_data()) to detect OOM errors. Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 8c3f9ea07392177b6de9d946d40f97128fa51632)
2013-02-13util: add some defensive coding in u_upload_alloc()Brian Paul1-1/+8
Some callers of this function were checking the 'ptr' result to see if the function failed. But the correct way is to check the regular return value for PIPE_ERROR_x. Now we initialize all the returned values at the top of the function in case we do hit an error (like OOM). Callers are more likely to detect OOM conditions now. But there are some callers which don't do any error checking... Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 68a097596efdf314ec60487a1761cac789ae2367) Conflicts: src/gallium/auxiliary/util/u_upload_mgr.c
2013-02-13st/mesa: add null pointer check in st_renderbuffer_delete()Brian Paul1-4/+4
In my testing I haven't found any cases where we get a null context pointer, but it might still be possible. Check for null just to be safe. Note: This is a candidate for the stable branches. (cherry picked from commit a4311054c78536acba0c3006c5d2805e182fa483)
2013-02-13mesa: remove warning message in _mesa_reference_renderbuffer_()Brian Paul1-4/+1
We were warning when there was no current context and we're about to delete a renderbuffer, but that happens fairly often and isn't really a problem. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=57754 Note: This is a candidate for the stable branches. Tested-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 006918c0db77e945ac56b15bc64eba502b86d56c)
2013-02-13dri_glx: fix use after free reportBrian Paul1-1/+4
the critical error would use driverName. Found by internal RH coverity scan. Note: This is a candidate for stable branches. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit a0ec9185eb90568ab57170dc682de0ba0c9e5e62) Conflicts: src/glx/dri_glx.c
2013-02-13st/mesa: fix context use-after-free problem in st_renderbuffer_delete()Brian Paul1-3/+5
The use-after-free happened when the renderbuffer was shared by multiple contexts and we tried to delete the renderbuffer using a context which was previously deleted. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit 4cedb65a43ae81c7ac71e631c854b7404dd2b61b)
2013-02-13mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul15-28/+31
We sometimes need a rendering context when deleting renderbuffers. Pass it explicitly instead of trying to grab a current context (which might be NULL). The next patch will make use of this. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (cherry picked from commit c73245882c7ff1277b190b97f093f7b423a22f10) Conflicts: src/mesa/swrast/s_renderbuffer.c
2013-02-13mesa: fix-up and use _mesa_delete_renderbuffer()Brian Paul7-7/+11
_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 <jfonseca@vmware.com> (cherry picked from commit 8472bb4508515cf0f717344ef5cc863b6e97e56a)
2013-02-13configure.ac: GLX cannot work without OpenGLMichel Dänzer1-0/+10
GLX uses mapi/glapi/libglapi.la, which is only built for OpenGL. If the user specified --enable-xlib-glx --disable-opengl, error out, as these cannot be both observed at the same time. If the user just specified --disable-opengl but not --disable-glx, print a warning and disable GLX as well. NOTE: This is a candidate for the stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59364 Tested-by: Tom Stellard <thomas.stellard@amd.com> (cherry picked from commit 3b888f534cd42065b01ede8b9c646a2be0015509)
2013-02-13st/mesa: set ctx->Const.MaxSamples = 0, not 1Brian Paul1-0/+4
The gallium docs for pipe_screen::is_format_supported() says that samples==0 or samples==1 both mean that multisampling is not supported. Return GL_MAX_SAMPLES==0 instead of 1 for consistency with other drivers. Note: This is a candidate for the 9.0 branch. Reviewed-by: Marek Olšák <maraeo@gmail.com> (cherry picked from commit d60da27273d2cdb68bc32cae2ca66718dab15f27)
2013-02-13xlib: use _mesa_generate_mipmap() for mipmap generation, not metaBrian Paul1-0/+3
The swrast fragment program interpreter has trouble computing the right texture LOD because it doesn't have easy access to input derivatives. This causes the GLSL-based meta generate mipmap code to fetch texels from the wrong mipmap level. One possible fix would be to set the GL_TEXTURE_MIN/MAX_LOD parameters to limit sampling from the right level. But let's just use the _mesa_generate_mipmap() fallback since it's a lot faster than using the fragment shader interpreter. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=54240 Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit 89551ae04f4cf994c0f7f2ac3aef7e1c57936a29)
2013-02-13osmesa: use _mesa_generate_mipmap() for mipmap generation, not metaBrian Paul1-0/+3
See previous commit for more info. Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit 2180f3297285e96d7b69e1cef4414461ba42b0d2)
2013-02-13vbo: add a null pointer check to handle OOM instead of crashingBrian Paul1-0/+5
Note: This is a candidate for the 9.0 branch. (cherry picked from commit 7a89f08a22eb83ed2f0c51e516397d6415e64a3d)
2013-02-13svga: add NULL pointer check in svga_create_sampler_state()Brian Paul1-0/+3
Note: This is a candidate for the 9.0 branch. (cherry picked from commit 9227c5374170caccb7ffac85a131971d7d603171)
2013-02-13mesa: use GLbitfield64 when copying program inputsBrian Paul1-2/+2
Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit ccbb479f4090948ed3765495192332ebc4cf1f4f)
2013-02-13glx: only advertise GLX_INTEL_swap_event if it's supportedZack Rusin1-2/+3
Only drivers supporting DRI2 version >=4 support GLX_INTEL_swap_event. So lets mark it as such otherwise applications which use this extension (i.e. everything based on Clutter, e.g. gnome-shell) break horribly on drivers supporting DRI2 versions only up to 3. Note: This is a candidate for the 9.0 branch. Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit dbb2d192de33064ae6cdb799d71c5ac89a6ea8ff)
2013-02-13build: Fix build on systems where /usr/bin/python isn't python 2.Kenneth Graunke1-4/+4
configure.ac sets up a PYTHON2 variable, which is what we want AX_PYTHON_MODULE to use (since we only use Python 2 for now). NOTE: This is a candidate for the 9.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com> (cherry picked from commit 121d19de920212225586c9269f2d34ab7e6e1aec)
2013-02-13build: require python module libxml2Andreas Boll2-0/+50
configure should warn if libxml2 is not found. libxml2 is needed by glapi/gen. Fixes error during build in src/mapi/glapi/gen: ImportError: No module named libxml2 NOTE: This is a candidate for the 9.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 410b58c7bfcebbc866d2dc4ab32c6f23b55d383b)
2013-02-13glsl: Track UBO block names in the symbol table.Kenneth Graunke3-3/+18
The GLSL 1.40 spec says: "Uniform block names and variable names declared within uniform blocks are scoped at the program level." Track the block name in the symbol table and emit errors when conflicts exist. Fixes es3conform's uniform_buffer_object_block_name_conflict test, and fixes the piglit block-name-clashes-with-{variable,function,struct}.vert tests. NOTE: This is a candidate for the 9.0 branch. v2: Fix bad constructor initialization. Noticed by Topi Pohjolainen. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 4f29169913f99252c54e1922f6d164e2ef530a58)
2013-02-13r200: Fix probable thinko in r200EmitArraysAdam Jackson1-1/+2
Effectively this path would always assert. Move the break statement to the (probable) intended place. Note: This is a candidate for the stable branches. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> (cherry picked from commit 06f3a1f792e5f280c8e83581622b2f4bab811720)
2013-02-13unpack: support unpacking MESA_FORMAT_ARGB2101010Jordan Justen1-0/+18
Note: This is a candidate for the stable branches. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 2ace406b1fa502219d353e5d259d1c4bcd5633a5)
2013-02-13util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINTBrian Paul1-0/+36
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58972 Note: This is a candidate for the stable branches. (cherry picked from commit 073a53fe2f39cfa42090b223cbaf287b48cefe8e)