summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-12-03r600g: use load_ar checks with llvm output.HEADmasterVincent Lejeune1-0/+6
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-12-03android: fix bison warning of conflicting outputs to fileAdrian Marius Negreanu1-3/+0
Bison -o parameter expects a .c file. The corresponding .h filename is obtained by removing the extension of the initial .c. This was breaking compilation on Ubuntu 12.04 libmesa_dricore_intermediates/libmesa_dricore.a(program_parse.tab.o): In function `_mesa_parse_arb_program': external/mesa/src/mesa/program/program_parse.y:2682: multiple definition of `_mesa_parse_arb_program' libmesa_dricore_intermediates/libmesa_dricore.a(lex.yy.o):external/mesa/src/mesa/program/program_parse.y:2682: first defined here Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
2012-12-03st/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.
2012-12-03st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0Brian Paul1-4/+6
Only fail if GLX_SAMPLE_BUFFERS_ARB or GLX_SAMPLES_ARB are non-zero. We were already doing this in the older swrast/glx code. This fixes a piglit/waffle problem where we'd always fail to get a visual/config and report the test as "skip". Note: This is a candidate for the stable branches. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-12-03mesa: 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>
2012-12-03llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.James Benton13-43/+147
This required an update for the query storage in llvmpipe, there can now be an active query per query type, so an occlusion query can run at the same time as a time elapsed query. Based on PIPE_QUERY_TIME_ELAPSED patch from Dave Airlie. v2: fix up piglits for timers (also from Dave Airlie) a) if we don't render anything the result is 0, so just return the current time b) add missing screen get_timestamp callback. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2012-12-03gallivm: fix srgb format fetchRoland Scheidegger1-1/+2
we need to rely on util code for fetching those, just like before 9f06061d50f90bf425a5337cea1b0adb94a46d25. Fixes bugs 57699 and 57756. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-12-03llvmpipe: Refactor convert_to/from_blend_type to convert in place.José Fonseca1-12/+8
This fixes the "Source and destination overlap in memcpy" valgrind warnings. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-12-03llvmpipe: Improve color buffer loads/stores alignment.José Fonseca1-10/+19
Tell LLVM the exact alignment we can guarantee, based on the fs block dimensions, pixel format, and the alignment of the resource base pointer and stride. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-12-03llvmpipe: Recompute the fs shader key when framebuffer varies.José Fonseca1-0/+1
The fs shader now depends on the color buffer formats. The shader key was extended to accommodate this, but llvmpipe_update_derived needs to be updated to check the framebuffer dirty flag. This fixes bug 57674. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-12-02r300g: increment num_z_clears only if we have Hyper-ZMarek Olšák1-2/+1
2012-12-02r300g: add blacklist for apps that shouldn't steal hyperz accessMarek Olšák1-0/+28
2012-12-02r300g: enable Hyper-Z by default on r500Marek Olšák2-10/+13
I fixed the only known bugs on r500 with 0222b2bd4107b9e5cabfbc06c1a6ca3eae. Now there are no piglit regressions with Hyper-Z and all apps I tested seem to work. To summarize how it works: - Only one process can use it at a time. This is a hardware limitation. - The first process to clear a zbuffer gets the exclusive access to use Hyper-Z. - Compositors don't use any zbuffer, so they won't steal it, but some web browsers do, so make sure there's no web browser running if you want your game to use Hyper-Z. - There's no need to restart an app which couldn't get the access to Hyper-Z. Just quit the app which took it, the driver can turn it on for the other app in the middle of rendering. - If an app gets the access to Hyper-Z, it prints "radeon: Acquired Hyper-Z" to stdout. r300-r400: Hyper-Z will be enabled by default on r300-r400 once sufficient testing is done with piglit and Lightsmark at least. Be sure to set the env var RADEON_HYPERZ and run piglit with parameters: -c 0
2012-12-02r300g: clear the ZB cache before clearing ZMASK or HIZMarek Olšák2-2/+8
This fixes wrong rendering in Lightsmark and the piglit/depthstencil-render-miplevels. I think I fixed Hyper-Z. So far every app seems to work like a charm.
2012-12-02Revert "r300g: fix occlusion queries when depth test is disabled or zbuffer ↵Marek Olšák2-27/+6
is missing" It broke Hyper-Z terribly.
2012-12-01dri: Fix i965 buildChad Versace1-7/+5
The following commit broke the i965 build: commit 4a486f8bf2ca3d88228f8313282289abe78bc2f8 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Nov 23 18:31:42 2012 +0100 glx/dri2: add and use new driver hook flush_with_flags That commit added a forward declaration of enum __DRI2throttleReason to dri_interface.h. C++ 98 does not allow forward declarations of enums. The fix: Move the enum's definition to earlier in the file. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-12-02st/dri: implement new driver hook flush_with_flagsMarek Olšák4-56/+89
v2: added documentation for dri_flush as per Brian's request
2012-12-02st/mesa: make st_flush do what glFlush doesMarek Olšák1-0/+1
2012-12-02glx/dri2: add and use new driver hook flush_with_flagsMarek Olšák5-53/+123
2012-12-02glx: move the glFlush call one layer downMarek Olšák5-17/+35
2012-12-01r300g: refuse to create too large texturesMarek Olšák1-0/+15
2012-12-01r300g: fix memory leaks in texture_create error pathsMarek Olšák1-9/+15
2012-12-01r300g: fix revoking hyperz accessMarek Olšák1-20/+22
The bug was uncovered by 67c8e96f5ace67f9c17556934ee9532877d3a00. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57763
2012-12-01gallivm: drop border wrap clamping codeRoland Scheidegger1-33/+16
The border clamping code is unnecessary, since we don't care if a wrapped coord value is -1 or <-1 (same for length vs. >length), in either case the border handling code will mask out the offset and replace the texel value with the border color. Note that technically this is not entirely correct. Omitting clamping on the float coords means that flt->int conversion may result in undefined values for values of very large magnitude. However there's no reason we should honor this here since: a) we don't care for that for ordinary wrap modes in the aos code when converting coords and the problem is worse there (as we've got only effectively 24 instead of 32bits) b) at least in some cases the clamping was done already in int space hence doing nothing to fix that problem. c) with sse2 flt->int conversion with such values results in 0x80000000 which is just perfect (for clamp to border - not so much for the ordinary clamp to edge). Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-01r300g: handle map flag DISCARD_WHOLE_RESOURCEMarek Olšák3-4/+36
This should improve performance in apps which trigger this codepath. (e.g. Wine does)
2012-11-30radeon: Fix memory leak in radeonCreateScreen2.Vinson Lee1-1/+3
Fixes a memory leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-30nouveau: 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>
2012-12-01glsl: fix uninitialised variable from constructorDave Airlie1-0/+1
Coverity pointed out this uninitialised class member. Note: This is a candidate for stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-01glsl: initialise killed_all field.Dave Airlie1-0/+1
coverity pointed out this field was being used uninitialised. Note: This is a candidate for stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-01svga: remove pointless assert on unsigned >= 0Dave Airlie1-1/+0
all unsigneds are >= 0 :-) There may be an argument for leaving this in, in case someone changes min_lod to an integer, so feel free to apply or drop. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-01glsl: fix cut-n-paste error in error handling. (v2)Dave Airlie1-2/+2
Reported by coverity scan. v2: fix second case Note: This is a candidate for stable branches. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-01r300g: fix comparison of hyperz flush time.Dave Airlie1-1/+1
I haven't confirmed this is doing the correct thing, but at least this might make someone review it! Reported by internal RH coverity scan. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-12-01dri_glx: fix use after free reportDave Airlie1-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>
2012-11-30Revert "glcpp: Rewrite line-continuation support to act globally."Carl Worth1-43/+66
This reverts commit 962a1c07b44fe500b79b3ca6806d72a432c1f055. Further testing revealed that this commit can cause the pre-processor to enter infinite loops. For now, simply revert this code until a cleaner, better-tested version is available.
2012-11-30glcpp: Rewrite line-continuation support to act globally.Carl Worth1-66/+43
Previously, we were only supporting line-continuation backslash characters within lines of pre-processor directives, (as per the specification). With OpenGL 4.2 and GLES3, line continuations are now supported anywhere within a shader. While changing this, also fix a bug where the preprocessor was ignoring line continuation characters when a line ended in multiple backslash characters. The new code is also more efficient than the old. Previously, we would perform a ralloc copy at each newline. We now perform copies only at each occurrence of a line-continuation. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-30egl/wayland: Dispatch the event queue before get_buffersAnder Conselvan de Oliveira2-2/+4
When a client frame callback is executed and the client starts rendering again, the egl event queue might not have been dispatched so that the buffer release event for the previous frame hasn't been processed. In that case a third buffer is allocated, even though it would be possible to reuse the buffer that was just released. The wl_display_dispatch_queue_pending() entry point is available from wayland-client 1.0.2, so require that in configure.ac. Also, just let the pkg-config macro throw its own error, which will show what version we were looking for and failed to find. Note: This is a candidate for stable branches. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2012-11-30egl/wayland: Add invalidate back in eglSwapBuffers()Kristian Høgsberg1-0/+1
Commit ca3ed3e024864e91ca3cccc59fb96950e1d079b5 fixed the problem where eglMakeCurrent would trigger a getbuffer callback that then breaks the following wl_egl_window_resize() call. However, we still need to invalidate buffers in eglSwapBuffers, since in wayland we always swap buffers, so the dri driver needs to come out and ask us for the next buffer after each swapbuffer. Note: this is a candidate for stable branches. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-11-30i965/fs: Add fs_reg::is_zero() and is_one(); use for opt_algebraic().Kenneth Graunke2-7/+24
These helper macros save you from writing nasty expressions like: if ((inst->src[1].type == BRW_REGISTER_TYPE_F && inst->src[1].imm.f == 1.0) || ((inst->src[1].type == BRW_REGISTER_TYPE_D || inst->src[1].type == BRW_REGISTER_TYPE_UD) && inst->src[1].imm.u == 1)) { Instead, you simply get to write inst->src[1].is_one(). Simple. Also, this makes the FS backend match the VS backend (which has these). This patch also converts opt_algebraic to use the new helper functions. As a consequence, it will now also optimize integer-typed expressions. Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-30st/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>
2012-11-30util: added pipe_surface_release() functionBrian Paul1-0/+16
To fix a pipe_context::surface_destroy() use-after-free problem. We previously added pipe_sampler_view_release() for similar reasons. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-11-30mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul15-24/+29
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>
2012-11-30egl/wayland: Don't invalidate drawable on swap buffersAnder Conselvan de Oliveira3-1/+27
We used to invalidate the drawable after a call to eglSwapBuffers(), so that a wl_egl_window_resize() would take effect for the next frame. However, that leads to calling dri2_get_buffers() when eglMakeCurrent() is called with the current context and surface, and a later call to wl_egl_window_resize() would not take effect until the next buffer swap. Instead, add a callback from wl_egl_window_resize() back to the wayland egl platform, and invalidate the drawable only when it is resized. This solves a bug on wayland clients when going back to windowed mode from fullscreen when clicking a pop up menu, where the window size after this would be the fullscreen size. Note: this is a candidate for stable branches. CC: wayland-devel@lists.freedesktop.org
2012-11-30egl: Only enable GLX backend if X11 EGL platform is enabledKristian Høgsberg1-4/+4
We don't want to compile in a bunch of X11 dependencies in libEGL if we can't run EGL on X11.
2012-11-30llvmpipe: Remove remnants of lp_tile_soa from Makefile.José Fonseca2-4/+0
Completely forgot about updating Makefile when removing it. Stephane already fixed the make build, but there were a few mentions of lp_tile_soa left in the tree.
2012-11-29i965/fp: Fix segfault on gen4 TXB instructions.Eric Anholt1-0/+2
The gen4 simd16 workaround looks at ir->type to determine how much storage to allocate for the simd16 value. In fragment programs, texturing only ever returns float vec4s (unlike GLSL, which can also have scalar floats or vector integers), so this is the right type. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56962 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-29llvmpipe: Fix incorrect sizeof.Vinson Lee1-2/+2
Fixes sizeof not portable defects reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-29llvmpipe: Fix build break from 75da95c50Stéphane Marchesin1-2/+1
The Makefile looks for a file which is gone (lp_tile_soa.c) http://bugs.freedesktop.org/show_bug.cgi?id=57713
2012-11-29mesa: Fix GL_LUMINANCE handling for textures in glGetTexImageAnuj Phogat2-14/+41
We need to rebase colors (ex: set G=B=0) when getting GL_LUMINANCE textures in following cases: 1. If the luminance texture is actually stored as rgba 2. If getting a luminance texture, but returning rgba 3. If getting an rgba texture, but returning luminance A similar fix was pushed by Brian Paul for uncompressed textures in commit: f5d0ced. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47220 Observed no regressions in piglit and ogles2conform due to this fix. This patch will cause failures in intel oglconform pxconv-gettex, pxstore-gettex and pxtrans-gettex test cases. The cause of failures is a bug in test cases. Expected luminance value is calculted incorrectly in test cases: L = R+G+B. V2: Set G = 0 when getting a RG texture but returning luminance. Note: This is a candidate for stable branches. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <idr@freedesktop.org>
2012-11-29Revert "meta: Don't try to glOrtho when the draw buffer isn't initialized."Kenneth Graunke1-5/+3
This reverts commit 9947470655bbf8f4a9c98fe6d93ff5c3486f1124. Apparently it caused a lot of Piglit regressions.
2012-11-29r600g: mirror simplification of if/break opcodesVincent Lejeune1-32/+12
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>