aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* dri_util: Use calloc to allocate __DRIcontextIan Romanick2012-10-241-1/+1
| | | | | | | | | | | | | | | | The __DRIcontext contains some pointers, and some drivers check for them to be NULL in some failure paths. Instead of sprinkling NULL assignments across the various drivers, just zero out the whole thing. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-and-tested-by: Kenneth Graunke <[email protected]> Tested-by: Lu Hua <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54301 (cherry picked from commit f93cb0bebb10e3e3e5df099be51021b211650356)
* mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXTIan Romanick2012-10-241-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]> (cherry picked from commit ae3023e9675a033ff66b9bb14598aa1f02530d7f)
* mesa: fix dropped && in glGetStringi()Chris Forbes2012-10-241-1/+1
| | | | | | | | | | | This fixes glGetStringi(GL_EXTENSIONS,.. for core contexts. Previously, all extension names returned would be NULL. NOTE: This is a candidate for release branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit d30a7d2eb4b6d853bfa90169341334f2b2a643d5)
* i965: Drop the confusing saturate argument to math instruction setup.Eric Anholt2012-10-248-44/+6
| | | | | | | | | | | | | | | | | | | | This was ridiculous. We were ignoring the inst->header.saturate flag in the case of math and only math. On gen4, we would leave inst->header.saturate in place if it happened to be set, which would end up being applied to the implicit mov and thus trash the first argument. On gen6, we would overwrite inst->header.saturate with the saturate flag from the argument, which was not set appropriately in brw_vec4_emit.cpp, and was only not a bug due to our incompetence at coalescing saturate moves. By ripping the argument out and making saturate work just like all the other brw_eu_emit.c code generation, we can avoid both these classes of bugs. Fixes piglit fog-modes, and the new specific fs-saturate-exp2 case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48628 NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 9b4053cabd8bda180b352d2d2047209f6ca5f6e8)
* mesa: In conditional rendering fallback, check the query status.Eric Anholt2012-10-241-0/+2
| | | | | | | | | | | | Otherwise, conditional rendering always takes the fallthrough "render it anyway" case unless the application had itself done a check or wait on the query. Fixes intel oglconform's conditional_render advanced.nofbo.readpixels. Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 1b148e660e4cefcfbdc65ef8a58a7e52e8820782)
* mesa: Fix glPopAttrib() behavior on GL_FRAMEBUFFER_SRGB.Eric Anholt2012-10-241-0/+13
| | | | | | | | | | I happened to notice this while looking at a blit pass in l4d2, which had an optional push/pop around framebuffer srgb setting. It didn't matter in the end, but the fix is sitting in my tree now. Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 4bbd12036819ed6a2d0993c437e0c02bf0c92b0b)
* i965/fs: Don't use brw->fragment_program in calculate_urb_setup().Kenneth Graunke2012-10-241-1/+1
| | | | | | | | | | | | | | | | | | | Reading brw->fragment_program is nonsensical in compiler code: it contains the currently active program (if any), not the one currently being compiled. Attempting to access it may either lead to crashes (null pointer dereference if no program is active) or wrong results. Fixes piglit regressions since 9ef710575b914ddfc8e9a162d98ad554c1c217f7 on pre-Sandybridge hardware. The actual bug was created in commit 7b1fbc688999fd568e65211d79d7678562061594. NOTE: This is a candidate for the 9.0 and 8.0 branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54183 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]> (cherry picked from commit 4d9abd96cc177cade79b64544096eb45bf8313a2)
* st/mesa: s/CALLOC/calloc/ to fix allocation bugBrian Paul2012-10-241-1/+1
| | | | | | | | | | The CALLOC() macro only takes one argument so this was being treated as a comma expression. Simply use calloc() instead. A follow-on patch will replace all CALLOC() calls with calloc(). NOTE: This is a candidate for the 8.0 and 9.0 branches. (cherry picked from commit 43ed822a50db6b980041ddf91c16c7f8fccc4092)
* i965: Fix accumulator_contains() test to also reject swizzles of the dst.Eric Anholt2012-10-241-1/+1
| | | | | | | | | | | | | | | When faced with this sequence: MOV R1, c[1]; MAD R0, R2, R1.x, R1.y; we were concluding that the MOV of R1 set up our accumulator and so we could just use the previous result. Only, it's got R1.xyzw in it instead of the r1.y we're looking for. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46784 NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 6754ec831e5aaec516db929c8db6e7478a2f5540)
* glsl/linker: Avoid buffer over-run in parcel_out_uniform_storage::visit_fieldStéphane Marchesin2012-10-241-1/+1
| | | | | | | | | | | | When too may uniforms are used, the error will be caught in check_resources (src/glsl/linker.cpp). NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Stéphane Marchesin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Benoit Jacob <[email protected]> (cherry picked from commit ff996cafce511dd8a6c4e066e409c23e147a670c)
* mesa/es: Validate glTexImage border in Mesa code rather than the ES wrapperIan Romanick2012-10-242-10/+4
| | | | | | | | | | | | Also validate glCopyTexImage border. This fixes a bug in the APIspec. Previously glTexImage3DOES could be passed a non-zero border without error. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (cherry picked from commit 0686ccac950bac1a650400b29c47ddaafea22fa9)
* mesa: Generate an error when glCopyTexImage border is invalidIan Romanick2012-10-241-0/+2
| | | | | | | | | NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (cherry picked from commit 59d965333c05534475b60042571366656b97ab9d)
* mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base imageBrian Paul2012-10-241-0/+2
| | | | | | | | | | | | | This seems to be expected by the WebGL texture-mips test. The error makes sense, but I haven't found (yet) any OpenGL documentation specifying this error condition. See http://bugs.freedesktop.org/show_bug.cgi?id=44912 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]> (cherry picked from commit f6b7157550205a0633b4c2cb49a807d581176e21)
* st/mesa: index can be negative in the PROGRAM_CONSTANT caseNiels Ole Salscheider2012-10-241-1/+1
| | | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 8cc1860d4a55c93ce12a649c281012b37212ffbd)
* gallium/u_blit: set dst format from pipe_resource, not pipe_surfaceMarek Olšák2012-10-241-1/+1
| | | | | | | We use it to decide whether we can use resource_copy_region. NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit b7c4ee21c53a73d84e352d6f3db2547f6434d14e)
* intel: Move finish_batch() call before MI_BATCH_BUFFER_END and padding.Kenneth Graunke2012-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Gen4+, brw_finish_batch() calls brw_emit_query_end(), which emits some extra PIPE_CONTROLs to capture the current occlusion query data. Unfortunately, it was being called *after* _intel_batchbuffer_flush added the MI_BATCH_BUFFER_END, meaning those PIPE_CONTROLs didn't get inside the batch. Not only does this likely cause bogus occlusion query values, it can also cause crashes: with the recent change to use 64-bit depth count writes on Gen6+, we started emitting an odd-length PIPE_CONTROL, which happened after the MI_NOOP padding. This resulted in an odd-length batch buffer, which resulted in execbuf2 returning -EINVAL and the application dying with an intel_do_flush_locked failure. On older generations, finish_batch() doesn't emit any state, so this change shouldn't have any effect. Huge thanks to Chris Wilson for helping me figure this out. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53311 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit 9da50667f490ba2c6240f4c91c9707e3f181adae)
* softpipe: fix softpipe_delete_fs_state() failed assertionBrian Paul2012-10-241-2/+4
| | | | | | | | | | | | | | The var!=softpipe->fs_variant assertion was failing because we weren't nulling the softpipe->fs_variant pointer when binding a new shader. Since softpipe->fs_variant depends on the current fs, it's of no use when a new FS is bound. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53318 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]> (cherry picked from commit 16c702ef3b9cff320c2adbfa853e00088adbf689)
* st/mesa: fix renderbuffer validation bugBrian Paul2012-10-241-0/+6
| | | | | | | | | | | | | | | After we attach a new renderbuffer in this function we need to make sure Mesa's update_framebuffer() gets called. Fixes crash in WebGL conformance/textures/texture-attachment-formats.html, but the test still fails for other reasons. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53316 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]> (cherry picked from commit cf77c29e6015d177c046adee3c48589cc9fb5015)
* gallivm: fix crash in lp_sampler_static_state()Brian Paul2012-10-241-4/+3
| | | | | | | | | | | | | Fixes WebGL conformance/uniforms/uniform-default-values.html crash. We need to check for the null view pointer before accessing view->texture. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53317 Note: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]> (cherry picked from commit f7af4beae5e25c060d4f2c53d55b0e87ee9bdaeb)
* st/mesa: fix glCopyTexSubImage crashBrian Paul2012-10-241-1/+9
| | | | | | | | | | | | | | | Fixes a WebGL crash. The dest texture image is at level 2 and is of size 1x1 texel. The st texture image is a stand-alone resource, not a pointer into a complete mipmap. So the resource has one level and trying to write to level 2 blows up. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53314 and http://bugs.freedesktop.org/show_bug.cgi?id=53319 Note: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]> (cherry picked from commit 9b04abe36812a34ba447e5b1f8d8e44a10510820)
* i965/vs: Convert EdgeFlagPointer values appropriately for the VS on gen4.Eric Anholt2012-10-241-0/+10
| | | | | | | | Fixes piglit gl-2.0/edgeflag. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit b3367f56d880550befb31a0100c448e1d607915f)
* dri2: Fix bug in attribute handling for non-desktop OpenGL contextsIan Romanick2012-10-241-6/+17
| | | | | | | | | | | | | | | | Previously an error would be generated if any attributes were specified when creating a non-desktop OpenGL context. This was a mistake, and it will prevent old drivers from working with new EGL libraries that add support for the createContextAttribs interface. Instead, match the behavior of EGL_KHR_create_context: allow versions that make sense, reject non-zero flags. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Cc: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]> (cherry picked from commit 63adb6b9eaa723f6bf9603f3f567e04451df857e)
* i965/vs: Don't clobber sampler message MRFs with subexpressions.Kenneth Graunke2012-10-241-17/+42
| | | | | | | | | | | | | See the preceding commit for a description of the problem. NOTE: This is a candidate for stable release branches. v2: Use a separate dPdx variable rather than reusing the lod src_reg. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52129 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit 54c045b93cd205bcf031e70d65238d60bfc07da4)
* swrast: Fix implicit declaration warningsChad Versace2012-10-241-0/+1
| | | | | | | | | | | | | | In a recent commit, commit 1c0f1dd42a50464eeb81de4aad8eecf24b3d6c89 Author: Chad Versace <[email protected]> swrast: Fix fixed-function fragment processing I defined a new function,_swrast_fragment_program, but neglected to #include s_fragprog.h for clients of that function. Note: This is a candidate for the 8.0 branch. Reported-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]> (cherry picked from commit ab1195cf1127781909d5158c7de68f8732458d75)
* i965: Fix regression in depth texture rendering on pre-SNBIan Romanick2012-10-241-2/+4
| | | | | | | | | | | | | | | | | | | | | This was introduced by commit 24db6d6 (cherry-picked from a683012). The original patch fixed potential GPU hangs on SNB, and it caused some rendering regressions there. The benefits outweigh the costs. However, the work-around is not necessary for pre-SNB chipsets. Applying the work-around there gives rendering regressions with no benefit. This patch disables the work-around on pre-SNB chipsets. Without the original patch, the piglit test depthstencil-render-miplevels would reliably hang an SNB GPU. On ILK this test would not hang, and it does not hang with this patch. NOTE: This is a candidate for the 8.0 and 9.0 branches Signed-off-by: Ian Romanick <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]> (cherry picked from commit 5fe5aa8e55a8db0b80f6ff9838bad47ce0406fd0)
* st/mesa: Fix assertions for copying texture image to finalized miptree.Michel Dänzer2012-10-241-1/+4
| | | | | | | | | | | | | | | | | | The layer dimension of array textures is not subject to mipmap minification. OTOH we were missing an assertion for the depth dimension. Fixes assertion failures with piglit {f,v}s-textureSize-sampler1DArrayShadow. For some reason, they only resulted in piglit 'warn' results for me, not failures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56211 NOTE: This is a candidate for the stable branches. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Andreas Boll <[email protected]> (cherry picked from commit eee1ff423c6a0c9c776b4e76b79bb5ed5480d83c)
* r600g: fix instance divisor on CaymanMarek Olšák2012-10-191-19/+35
| | | | | | | | | NOTE: This is a candidate for the stable branches. (cherry picked from commit 836325bf7edd797e02ab0717a05ca5c51aa1ac93) Conflicts: src/gallium/drivers/r600/r600_asm.c
* st/mesa: Fix source miptree level for copying data to finalized miptree.Michel Dänzer2012-10-191-1/+5
| | | | | | | | | | | | | Fixes WebGL texture mips conformance test, no piglit regressions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912 NOTE: This is a candidate for the stable branches. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Andreas Boll <[email protected]> (cherry picked from commit c2e37b1d2e1b8014475c7d2698fba317c9082d70)
* r600g: fix EXP on CaymanMarek Olšák2012-10-161-4/+2
| | | | | NOTE: This is a candidate for the stable branches. (cherry picked from commit 96f50d0cf7bb13507f272d2f6ef9a6fca24d18e1)
* r600g: fix RSQ of negative value on CaymanMarek Olšák2012-10-161-0/+5
| | | | | NOTE: This is a candidate for the stable branches. (cherry picked from commit fd5c5384648a0d6191c19748a2d1f1148c5ee98f)
* winsys/radeon: fix relocs cachingVadim Girlin2012-10-162-8/+6
| | | | | | | | | | | | Don't cache pointers to elements of reallocatable array. In some circumstances it caused false cache hits resulting in incorrect command stream and gpu lockup. Note: This is a candidate for the stable branches. Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 9aa8bac98b823e8783bc3a06a6e5b23fbf8d87fb)
* r300g: fix colormask with non-BGRA formatsMarek Olšák2012-10-164-31/+160
| | | | | NOTE: This is a candidate for the stable branches. (cherry picked from commit 1e51d368eb5360378218217ff35731896f48512f)
* r600g: 8.0.x support for TrinityAlex Deucher2012-10-163-3/+5
| | | | | | | | This is a backport of the following commits from master: b4082f492b4b55df4c636445e47b97d1f1e4b5b2 75f9d24ac4a539a8f0c16c9bd66e11dc394ba81b Signed-off-by: Alex Deucher <[email protected]>
* radeon: fix Base/base typoBrian Paul2012-10-141-1/+1
| | | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=52563 (cherry picked from commit 38184dcd54e77c8f9adc89d337a97afd630b2c07)
* i965: Add support for GL_SKIP_DECODE_EXT on other SRGB formats.Eric Anholt2012-10-121-8/+3
| | | | | | | | | | | | | | | | Fixes some failures in getteximage-formats. v2: Remove stray include, and drop extra test for encoding == GL_SRGB -- _mesa_get_srgb_format_linear() returns the same format if it wasn't SRGB. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48120 Reviewed-by: Kenneth Graunke <[email protected]> (v1) NOTE: This is a candidate for the 8.0 branch. (cherry picked from commit 19bd5936af7278c0cce0728e8d6dec1a951eaf58) Conflicts: src/mesa/drivers/dri/i965/brw_wm_surface_state.c
* glsl: Fix #pragma invariant(all) language version check.Kenneth Graunke2012-10-121-1/+1
| | | | | | | | | | | | | | | | | | It was using state->Const.GLSL_100ES, which is set if the driver supports ARB_ES2_compatibility or we're in ES2 mode. Instead, it should use state->language_version, as that represents the actual GLSL version of the shader being compiled. Since the correct logic is < 120 && !100, just make it == 110. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit 03ac5c54b55006a7014525c3dc1ebd6ed215b6be) Conflicts: src/glsl/glsl_parser.yy
* i965: Support MESA_FORMAT_SIGNED_RGBA_16.Kenneth Graunke2012-10-121-1/+1
| | | | | | | | | | | | | | | | | The hardware supports this format with no known quirks, so we may as well enable it. Alpha blending is not supported until Sandybridge, but as far as I can tell, OpenGL doesn't require alpha blending on SNORM formats. Plus, we already expose R8G8B8A8_SNORM which has a similar restriction. Fixes 6 piglit texwrap-2D-*SNORM* cases, gl-3.1/required-sized-texture-formats, and 10 oglconform snorm-textures subcases Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit f56dfc32134d65599159f53215713bf372c51a13)
* st/mesa: call update_renderbuffer_surface for sRGB renderbuffers, tooChristoph Bumiller2012-10-121-2/+3
| | | | | | | | | | | | | sRGBEnabled should affect both textures and renderbuffers, so we need to check/update the pipe_surface format for both. Fixes, for instance, rendering appearing too bright in wine applications using sRGB multisample renderbuffers. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 51e41a0d894109249448ecc6a6bfc09e095acada)
* meta: fix glDrawPixels fallback test, stencil drawingBrian Paul2012-10-121-2/+2
| | | | | | | | | | | | | | | | | | | Remove the check for pixel transfer ops. If any RGB/depth scale/bias is in effect, it'll be applied in the glTexImage step. If drawing stencil pixels we need to disable pixel transfer so that alpha scale/bias are not applied to the stencil data. These issues were spotted by Roland. Fixes Blender performance issues reported in http://bugs.freedesktop.org/show_bug.cgi?id=47375 NOTE: This is a candidate for the 8.0 branch. Tested-by: Barto <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> (cherry picked from commit 906febaf8bd37fffa4fc14c56eda1dd6e4b4dcda)
* svga: fix invalid memory reference in needs_to_create_zero()Brian Paul2012-10-121-5/+5
| | | | | | | | | | | | | | | The emit->key.fkey info is only valid if we're generating a fragment shader. We should not look at it if we're generating a vertex shader. When generating a vertex shader, the value of emit->key.fkey.num_textures was garbage and the loop over num_textures would read invalid data. At best this would cause us to emit an unused constant. At worse, we could segfault. Just by dumb luck, fkey.num_textures was usually a smallish integer. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]> (cherry picked from commit dafa77201f116dc53b18a274fb41eef5bb2bd0e3)
* radeon: set swrast_renderbuffer::ColorType field when mapping renderbuffersBrian Paul2012-10-121-0/+2
| | | | | | | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=47375 NOTE: This is a candidate for the 8.0 branch. Tested-by: Barto <[email protected]> (cherry picked from commit 0e893b42610a2e8f2797bd7da68669dac38d9538)
* xlib: add X error handler around XGetImage() callBrian Paul2012-10-121-0/+29
| | | | | | | | | | | XGetImage() will generate a BadMatch error if the source window isn't visible. When that happens, create a new XImage. Fixes piglit 'select' test failures with swrast/xlib driver. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit a73e9207da188a65af50da279f1436566c4a8418)
* mesa: loosen small matrix determinant checkBrian Paul2012-10-121-1/+1
| | | | | | | | | | | | | | When computing a matrix inverse, if the determinant is too small we could hit a divide by zero. There's a check to prevent this (we basically give up on computing the inverse and return the identity matrix.) This patch loosens this test to fix a lighting bug reported by Lars Henning Wendt. v2: use abs(det) to handle negative values NOTE: This is a candidate for the 8.0 branch. Tested-by: Lars Henning Wendt <[email protected]> (cherry picked from commit 50db8129152f3d5ea8db13d55f82673d53bf1b8f)
* intel: move error on create context to proper pathJordan Justen2012-10-121-1/+1
| | | | | | | | | | The error was being set on the non-error path, rather than the error path. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit 881bb4ac7285c462079844072fc1d0b26e340b12)
* mesa: Prevent repeated glDeleteShader() from blowing away our refcounts.Kenneth Graunke2012-10-121-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]> (cherry picked from commit c3bc41011f9ffe648b7dd4915c6202b776cd1ab4)
* i830: Fix stack corruptionChad Versace2012-10-121-1/+1
| | | | | | | | | | | | | | | | Found by compiler warning: i830_texstate.c:131:28: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] memset(state, 0, sizeof(state)); ~~~~~ ^~~~~ On 64-bit systems, memset here would write an extra 4 bytes. Note: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Chad Versace <[email protected]> (cherry picked from commit 735070c45b403a9631415b09e9fd519f601f0229)
* mesa: disable MSVC global optimization in pack.cJosé Fonseca2012-10-121-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]> (cherry picked from commit 1a8f6ac5a46dfbb8287ee2bacdd11c3a1a3a65c7)
* Revert "i965: Avoid unnecessary recompiles for shaders that don't use dFdy()."Ian Romanick2012-10-124-10/+14
| | | | | | | This patch depends on some other patches that were not picked over. As a result, this patch causes a bunch of piglit regressions on SNB. This reverts commit 55d23cfc561e53a8514163a188811bddcc09b7df.
* darwin: do not create double-buffered offscreen pixel formatsJonas Maebe2012-09-241-1/+1
| | | | | | | http://xquartz.macosforge.org/trac/ticket/536 Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> (cherry picked from commit 5fdf1f784bf449d7ce9839506fa23c5357696c4c)
* winsys/radeon: Remove unnecessary pipe_thread_destroy in radeon_drm_cs_destroyMaarten Lankhorst2012-09-201-1/+0
| | | | | | | | Fixes crash bug introduced with 210ddf0819b5 fd.o #49198 pthread_detach after a pthread_join is unneeded. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Marek Olšák <[email protected]>