aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
...
* llvmpipe: Fix alignment.José Fonseca2012-12-041-0/+5
| | | | | | | | | My understanding and actual implementation of how the pixels are being fetch differed. This fixes bug 57863. Trivial.
* gallivm: Generalize lp_build_mul and lp_build_lerp for signed normalized types.José Fonseca2012-12-041-92/+82
| | | | | | | | This fixes fdo bug 57755 and most of the failures of piglit fbo-blending-formats GL_EXT_texture_snorm. GL_INTENSITY_SNORM is still failing, but problem is probably elsewhere, as GL_R8_SNORM works fine.
* automake/gallium: attempt to fix -lrtDave Airlie2012-12-041-1/+1
| | | | | | | | | fix non-automake bits in pipe-load to. Should fix: http://bugs.freedesktop.org/57852 Signed-off-by: Dave Airlie <[email protected]>
* u_cache: fix dereference before NULL checkDave Airlie2012-12-041-4/+4
|
* gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM >= 3.2.Johannes Obermayr2012-12-031-1/+5
| | | | | | | | Also remove the recently added and overloaded LLVM_CXXFLAGS from CXXFLAGS. Note: This is a candidate for the stable branches. Reviewed-by: Tom Stellard <[email protected]>
* r300g: Give CLIP_DISABLE another tryStefan Dösinger2012-12-042-2/+3
| | | | Signed-off-by: Marek Olšák <[email protected]>
* st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0Brian Paul2012-12-031-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 <[email protected]>
* 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.
* 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
* 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)
* 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]>
* 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]>
* 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]>
* 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.
* 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
* 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>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-3/+3
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* gallium/postprocess: share pipe_context and cso_context with the state trackerMarek Olšák2012-11-296-26/+69
| | | | | | | Using one context instead of two is more efficient and we can skip another context flush. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fix lp_build_float_to_half.José Fonseca2012-11-291-30/+75
| | | | | | | | | | | The current implementation was close by not fully correct: several operations that should be done in floating point were being done in integer. Fixes piglit fbo-clear-formats GL_ARB_texture_float Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fix a trivial txq issue for 2d shadow and cube shadow samplersRoland Scheidegger2012-11-291-2/+2
| | | | | | | | | untested (couldn't get the piglit test to run even with version overrides) but seemed blatantly wrong. In any case it would only affect an error case which when it would happen probably all hope is lost anyway. Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: support array texturesRoland Scheidegger2012-11-296-7/+32
| | | | | | | | | | This adds array (1d,2d) texture support to llvmpipe. Though probably should do something about 1d array textures requiring gobs of memory (this issue is not strictly limited to arrays but it is probably worse there). Initial code by Jakob Bornecrantz <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallivm: support array texturesRoland Scheidegger2012-11-296-65/+103
| | | | | | | | | | | | | Support 1d and 2d array textures (including shadow samplers), and (as a side effect mostly) also shadow cube samplers. Seems to pass the relevant piglit tests both for sampling and rendering to (though some require version overrides). Since we don't support render target indices rendering to array textures is still restricted to a single layer at a time. Also, the min/max layer in the sampler view (which is unnecessary for GL) is ignored (always use all layers). Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: Remove lp_build_blend_soa()José Fonseca2012-11-295-538/+37
| | | | | | No longer used/necessary, as we always blend in AoS now. Trivial.
* llvmpipe: Eliminate color buffer swizzling.José Fonseca2012-11-2917-1334/+30
| | | | | | | | | | | | Now dead code. Also had to remove the show_tiles/show_subtiles because now the color buffers are always stored in their native format, so there is no longer an easy way to paint the tile sizes. Depth-stencil buffers are still swizzled. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Only advertise unswizzled formats.José Fonseca2012-11-293-25/+17
| | | | | | | | | | | | | | Update llvmpipe_is_format_supported and llvmpipe_is_format_unswizzled so that only the formats that we can render without swizzling are advertised. We can still render all D3D10 required formats except PIPE_FORMAT_R11G11B10_FLOAT, which needs to be implemented in a future opportunity. Removal of rendertarget swizzling will be done in a subsequent change. Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_format: Kill util_format_is_array().José Fonseca2012-11-294-53/+4
| | | | | | | | It is buggy (it was giving wrong results for some of the formats with padding), and util_format_description::is_array already does precisely what's intended. Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_format: Tighten the meaning of is_array bit to exclude mixed type ↵José Fonseca2012-11-292-2/+11
| | | | | | | | | | | formats. This is what we want in practice. The only change is in PIPE_FORMAT_R8SG8SB8UX8U_NORM, which no longer is considered an array format. Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_format: Fix format manipulation for big-endianAdhemerval Zanella2012-11-291-5/+5
| | | | | | | | This patch fixes various format manipulation for big-endian architectures. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Fix format manipulation for big-endianAdhemerval Zanella2012-11-295-12/+145
| | | | | | | | This patch fixes various format manipulation for big-endian architectures. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Add byte-swap construct callsAdhemerval Zanella2012-11-292-0/+89
| | | | | | | | | | | This patch adds two more functions in type conversions header: * lp_build_bswap: construct a call to llvm.bswap intrinsic for an element * lp_build_bswap_vec: byte swap every element in a vector base on the input and output types. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Fix vector constant for shuffleAdhemerval Zanella2012-11-291-1/+6
| | | | | | | | This patch fixes the vector constant generation used for vector shuffle for big-endian machines. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: clear Altivec NJ bitAdhemerval Zanella2012-11-291-0/+19
| | | | | | | | This patch enforces the clear of NJ bit in VSCR Altivec register so denormal numbers are handles as expected by IEEE standards. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Altivec floating-point roundingAdhemerval Zanella2012-11-291-23/+70
| | | | | | | | | This patch adds Altivec intrinsics for float vector types. It changes the SSE specific definitions to a platform neutral and adds the calls to Altivec intrinsic builder. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Altivec vector add/sub intrisicsAdhemerval Zanella2012-11-292-15/+27
| | | | | | | | | | | | | This patch add correct vector addition and substraction intrisics when using Altivec with PPC. Current code uses default path and LLVM backend ends up issuing carry-out arithmetic instruction while it is expected saturated ones. It also includes a fix for PowerPC where char are unsigned by default, resulting in bogus values for vector shifting. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Altivec vector max/min intrisicsAdhemerval Zanella2012-11-291-2/+54
| | | | | | | | This patch adds the PPC Altivec instrics max/min instruction for supported Altivec vector types (16xi8, 8xi16, 4xi32, 4xf32). Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>