summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.James Benton2012-12-0313-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 <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* gallivm: fix srgb format fetchRoland Scheidegger2012-12-031-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 <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: Refactor convert_to/from_blend_type to convert in place.José Fonseca2012-12-031-12/+8
| | | | | | | This fixes the "Source and destination overlap in memcpy" valgrind warnings. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Improve color buffer loads/stores alignment.José Fonseca2012-12-031-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 <[email protected]>
* llvmpipe: Recompute the fs shader key when framebuffer varies.José Fonseca2012-12-031-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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* r300g: increment num_z_clears only if we have Hyper-ZMarek Olšák2012-12-021-2/+1
|
* r300g: add blacklist for apps that shouldn't steal hyperz accessMarek Olšák2012-12-021-0/+28
|
* r300g: enable Hyper-Z by default on r500Marek Olšák2012-12-022-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
* r300g: clear the ZB cache before clearing ZMASK or HIZMarek Olšák2012-12-022-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.
* Revert "r300g: fix occlusion queries when depth test is disabled or zbuffer ↵Marek Olšák2012-12-022-27/+6
| | | | | | is missing" It broke Hyper-Z terribly.
* dri: Fix i965 buildChad Versace2012-12-011-7/+5
| | | | | | | | | | | | | | | | | The following commit broke the i965 build: commit 4a486f8bf2ca3d88228f8313282289abe78bc2f8 Author: Marek Olšák <[email protected]> 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 <[email protected]>
* st/dri: implement new driver hook flush_with_flagsMarek Olšák2012-12-024-56/+89
| | | | v2: added documentation for dri_flush as per Brian's request
* st/mesa: make st_flush do what glFlush doesMarek Olšák2012-12-021-0/+1
|
* glx/dri2: add and use new driver hook flush_with_flagsMarek Olšák2012-12-025-53/+123
|
* glx: move the glFlush call one layer downMarek Olšák2012-12-025-17/+35
|
* r300g: refuse to create too large texturesMarek Olšák2012-12-011-0/+15
|
* r300g: fix memory leaks in texture_create error pathsMarek Olšák2012-12-011-9/+15
|
* r300g: fix revoking hyperz accessMarek Olšák2012-12-011-20/+22
| | | | | The bug was uncovered by 67c8e96f5ace67f9c17556934ee9532877d3a00. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57763
* gallivm: drop border wrap clamping codeRoland Scheidegger2012-12-011-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 <[email protected]>
* r300g: handle map flag DISCARD_WHOLE_RESOURCEMarek Olšák2012-12-013-4/+36
| | | | | This should improve performance in apps which trigger this codepath. (e.g. Wine does)
* radeon: Fix memory leak in radeonCreateScreen2.Vinson Lee2012-11-301-1/+3
| | | | | | | Fixes a memory leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nouveau: Fix build.Brian Paul2012-11-301-1/+1
| | | | | | | | Fixes nouveau build failure introduced at c73245882c7ff1277b190b97f093f7b423a22f10. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57746 Signed-off-by: Vinson Lee <[email protected]>
* glsl: fix uninitialised variable from constructorDave Airlie2012-12-011-0/+1
| | | | | | | | | Coverity pointed out this uninitialised class member. Note: This is a candidate for stable branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: initialise killed_all field.Dave Airlie2012-12-011-0/+1
| | | | | | | | | coverity pointed out this field was being used uninitialised. Note: This is a candidate for stable branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* svga: remove pointless assert on unsigned >= 0Dave Airlie2012-12-011-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: fix cut-n-paste error in error handling. (v2)Dave Airlie2012-12-011-2/+2
| | | | | | | | | | | | Reported by coverity scan. v2: fix second case Note: This is a candidate for stable branches. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r300g: fix comparison of hyperz flush time.Dave Airlie2012-12-011-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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri_glx: fix use after free reportDave Airlie2012-12-011-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Revert "glcpp: Rewrite line-continuation support to act globally."Carl Worth2012-11-301-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.
* glcpp: Rewrite line-continuation support to act globally.Carl Worth2012-11-301-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 <[email protected]>
* egl/wayland: Dispatch the event queue before get_buffersAnder Conselvan de Oliveira2012-11-302-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 <[email protected]>
* egl/wayland: Add invalidate back in eglSwapBuffers()Kristian Høgsberg2012-11-301-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 <[email protected]>
* i965/fs: Add fs_reg::is_zero() and is_one(); use for opt_algebraic().Kenneth Graunke2012-11-302-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 <[email protected]>
* st/mesa: fix context use-after-free problem in st_renderbuffer_delete()Brian Paul2012-11-301-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 <[email protected]>
* util: added pipe_surface_release() functionBrian Paul2012-11-301-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 <[email protected]>
* mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul2012-11-3015-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 <[email protected]>
* egl/wayland: Don't invalidate drawable on swap buffersAnder Conselvan de Oliveira2012-11-303-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: [email protected]
* egl: Only enable GLX backend if X11 EGL platform is enabledKristian Høgsberg2012-11-301-4/+4
| | | | | We don't want to compile in a bunch of X11 dependencies in libEGL if we can't run EGL on X11.
* llvmpipe: Remove remnants of lp_tile_soa from Makefile.José Fonseca2012-11-302-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.
* i965/fp: Fix segfault on gen4 TXB instructions.Eric Anholt2012-11-291-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 <[email protected]>
* llvmpipe: Fix incorrect sizeof.Vinson Lee2012-11-291-2/+2
| | | | | | | Fixes sizeof not portable defects reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Fix build break from 75da95c50Stéphane Marchesin2012-11-291-2/+1
| | | | | | The Makefile looks for a file which is gone (lp_tile_soa.c) http://bugs.freedesktop.org/show_bug.cgi?id=57713
* mesa: Fix GL_LUMINANCE handling for textures in glGetTexImageAnuj Phogat2012-11-292-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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Revert "meta: Don't try to glOrtho when the draw buffer isn't initialized."Kenneth Graunke2012-11-291-5/+3
| | | | | This reverts commit 9947470655bbf8f4a9c98fe6d93ff5c3486f1124. Apparently it caused a lot of Piglit regressions.
* r600g: mirror simplification of if/break opcodesVincent Lejeune2012-11-291-32/+12
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g: separate resource_id and sampler_id tex info in tgsi-to-llvmVincent Lejeune2012-11-291-0/+3
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* glcpp: Update README for new support of __LINE__ and __FILE__.Carl Worth2012-11-291-3/+1
| | | | | | | | | Drop these from the known limitations list since support was recently added for these. Also, fix a typo while in the area, (and the oddly missing final newline). Reviewed-by: Matt Turner <[email protected]>
* glcpp: Add test involving token pasting of INTEGER tokens.Carl Worth2012-11-292-0/+15
| | | | | | | | | | | | | | | This test file is very similar to test 113-line-and-file-macros but uses token pasting for cleaner quiz answers (without spaces between the digits). This test passes thanks to the recent addition of support for pasting INTEGER tokens, (but would have failed without that). (Note that this test is distinct from test 059-token-pasting-integer which pastes integers parsed from the source. Those are parsed to INTEGER_STRING tokens and are already pasted correctly as verified by that test. The only way to generate the INTEGER tokens which currently fail to paste is with an internal define such as __LINE__ that results in an integer.) Reviewed-by: Matt Turner <[email protected]>
* glcpp: Add support for pasting of INTEGER tokens.Carl Worth2012-11-291-14/+47
| | | | | | | By generalizing the current code designed to paste string tokens of various types. Reviewed-by: Matt Turner <[email protected]>
* glcpp: Flag invalid pastes for integer followed by non-digitsCarl Worth2012-11-291-5/+13
| | | | | | | | | As recently tested in the additions to the invalid paste test, it is illegal to paste a non-digit sequence onto the end of an integer. The 082-invalid-paste test should now pass again. Reviewed-by: Matt Turner <[email protected]>