aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
...
* util: add new primitive types to pipe_prim_names[] arrayBrian Paul2013-01-141-0/+4
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fix clearing integer color buffersRoland Scheidegger2013-01-101-0/+2
| | | | | | | | | | | | | We get int/uint clear color value in this case, and util_pack_color can't handle these formats at all (even if it could, float input color isn't what we want). Pass through the color union appropriately and handle the packing ourselves (as I couldn't think of a good generic util solution). This gets piglit fbo_integer_precision_clear and fbo_integer_readpixels_sint_uint from the ext_texture_integer test group from segfault to pass (which only leaves fbo-blending from that group not working). v2: fix up comments
* r300g: implement MSAAMarek Olšák2013-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | This is not as optimized as r600g - the MSAA compression is missing, so r300g needs a lot of bandwidth (more than r600g to do the same thing). However, if the bandwidth is not an issue for you, you can enjoy this unoptimized MSAA support. The only other missing optimization for MSAA is the fast color clear. MSAA is enabled on r500 only, because that's the only GPU family I tested. That said, MSAA should work on r300 and r400 as well (but you must set RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n, n >= 2, n <= 6) I will enable the support by default on r300-r400 once someone (other than me) tests those chipsets with piglit. The supported modes are 2x, 4x, 6x. The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only). Those 3 formats are used for all GL internal formats. Tested with piglit. (I have ported all MSAA tests to GL2.1)
* util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOATBrian Paul2013-01-041-1/+1
| | | | | | The Z32 pixel is 4 bytes so multiply x by 4, not 2. Note: This is a candidate for the stable branches.
* util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINTBrian Paul2013-01-041-0/+36
| | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58972 Note: This is a candidate for the stable branches.
* util: move var declaration before loop to fix MSVC errorBrian Paul2013-01-041-1/+2
|
* st/mesa: fix GetTexImage for compressed 2D array texturesMarek Olšák2013-01-041-0/+18
| | | | | | | This uses a 3D blit to decompress the texture and then a 3D transfer to read it. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: remove unused helper util_create_rgba_textureMarek Olšák2013-01-042-61/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: implement 3D blittingMarek Olšák2013-01-042-30/+83
| | | | | | Scaling and flipping in the Z direction isn't allowed yet. Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube indexMarek Olšák2013-01-041-0/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: minor simplificationMarek Olšák2013-01-041-10/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: unify some parameters into a dstbox parameter in blit_genericMarek Olšák2013-01-042-20/+25
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: remove useless parameter from blitter_default_dst_textureMarek Olšák2013-01-042-7/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/util: complete implementation of util_dump_transferMarek Olšák2013-01-041-4/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* util/u_format: Round when converting depth values from float to z16_unorm.José Fonseca2012-12-211-1/+1
| | | | | | This makes the z16_unorm -> float -> z16_unorm conversion lossless. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_blitter: Remove the overlapped blit assert from ↵Henri Verbeet2012-12-161-28/+0
| | | | | | | | | | | | util_blitter_blit_generic(). This is used by st_BlitFramebuffer() / r600_blit(), and ARB_fbo allows overlapped blits, even though the result is undefined. No piglit regressions on r600g / CYPRESS. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add a simple allocator for suballocating from a large bufferMarek Olšák2012-12-122-0/+180
| | | | | Tested-by: Aaron Watry <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-129-33/+13
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: move util_try_blit_via_copy_region to u_surface.cMarek Olšák2012-12-124-157/+164
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-122-0/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* util: add util_copy_constant_buffer() helper functionBrian Paul2012-12-111-0/+20
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/u_blitter: fix conflict with u_memory.hMarek Olšák2012-12-071-1/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* util: Add util_copy_box helper.José Fonseca2012-12-063-29/+64
| | | | | | Must users of util_copy_rect() need or should deal with volumes. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: Move the util_copy/fill_rect into u_surface.José Fonseca2012-12-064-186/+140
| | | | | | | | | | u_rect.h said these should move to a different file, and u_surface seems a better home. Leave #include "util/u_surface.h" to avoid having to touch thousand of files. Reviewed-by: Brian Paul <[email protected]>
* util/u_debug: Cleanup/fix debug_dump_image.José Fonseca2012-12-042-33/+27
| | | | | | | - Handle other formats. - Prevent CRLF on Windows. Reviewed-by: Brian Paul <[email protected]>
* util/u_draw: Skip rendering instead of aborting when excessive number of ↵José Fonseca2012-12-041-2/+9
| | | | | | | | | | | | instances is found. This is a temporary hack. I believe the only way of properly fixing this is to check buffer overflow just before fetching based on addresses, instead of number of vertices/instances. This change simply allows tests that stress buffer overflows to complete without asserting, and should not affect valid rendering. Reviewed-by: Brian Paul <[email protected]>
* util/surface: Always use the surface format when clearing.José Fonseca2012-12-041-7/+8
| | | | | | Not the texture format, as they might differ. Reviewed-by: Brian Paul <[email protected]>
* u_cache: fix dereference before NULL checkDave Airlie2012-12-041-4/+4
|
* 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]>
* util/u_format: Kill util_format_is_array().José Fonseca2012-11-292-51/+0
| | | | | | | | 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]>
* util: add more memory debugging featuresBrian Paul2012-11-281-1/+81
| | | | | | | | Add a DEBUG_FREED_MEMORY option to help catch use-after-free errors. Add debug_memory_check() function which can be periodically called to check that all known blocks are good. Reviewed-by: José Fonseca <[email protected]>
* util: Updated util_format_is_array to be more accurate.James Benton2012-11-282-3/+16
| | | | | | | Will allow formats with padding, e.g. RGBX. Will now allow swizzled formats as long as the alpha is channel 3. Reviewed-by: Jose Fonseca <[email protected]>
* util: Modified u_rect to default to memcpy.James Benton2012-11-271-8/+1
| | | | | | | | Previously this function would assert if the format didn't fit an expected 4 channel format size. Now will work with any format type with any amount of channels. Signed-off-by: José Fonseca <[email protected]>
* util/format: Fix bug in float to non-float conversion in u_format_pack.py.James Benton2012-11-271-1/+1
| | | | Signed-off-by: José Fonseca <[email protected]>
* util: Only use open coded snprintf for MSVC.Vinson Lee2012-11-162-3/+3
| | | | | | | | | | | | MinGW has snprintf. The patch fixes these warnings with the MinGW SCons build. src/gallium/auxiliary/util/u_snprintf.c:459:1: warning: no previous prototype for ‘util_vsnprintf’ [-Wmissing-prototypes] src/gallium/auxiliary/util/u_snprintf.c:1436:1: warning: no previous prototype for ‘util_snprintf’ [-Wmissing-prototypes] Signed-off-by: Vinson Lee <[email protected]> Tested-by: Brian Paul <[email protected]>
* util/u_debug: Fix DEBUG_NAMED_VALUE.José Fonseca2012-11-151-1/+1
| | | | "#__symbol" doesn't work with nested macro expansions, at least not on gcc.
* gallium/u_blitter: handle PIPE_TEXTURE_CUBE_ARRAY in is_box_inside_resourceMarek Olšák2012-11-111-0/+6
|
* u_blitter: fix cube array checkDave Airlie2012-11-101-1/+1
| | | | | | | | Pointed out by Marek on irc, no committing after beer! Signed-off-by: Dave Airlie <[email protected]>
* util/u_surface: Support 3D/array textures in util_resource_copy_region().José Fonseca2012-11-091-26/+44
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.José Fonseca2012-11-091-12/+6
| | | | | | | | | | util_pack_z_stencil was being unconditionally invoked for all formats, causing an assertion failure for Z32_FLOAT_S8X24_UINT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe,util: Fix blending of R and RG formats.José Fonseca2012-11-091-25/+1
| | | | | | | | | Alpha is also 1 for formats like R32G32_FLOAT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Fix reduction of line adjacency primitives.José Fonseca2012-11-091-0/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_rect: Make it C++ safe.José Fonseca2012-11-091-0/+15
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* u_blitter: don't create fragment program for cube maps unless supported.Dave Airlie2012-11-091-1/+6
| | | | | | should fix http://bugs.freedesktop.org/56906 Signed-off-by: Dave Airlie <[email protected]>
* u_blitter: add cube map array support.Dave Airlie2012-11-091-2/+3
| | | | | | | This adds cube array support to the blitter. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add defines/shader opcode for texture cube map arrayDave Airlie2012-11-091-0/+3
| | | | | | | | | | | | | | | | This just adds the texture target and capability along with 3 new opcodes required to support this extension. As this extension requires some texture opcodes with samp + 5 args, we need to use another src register, this is only required for TEX, TXL and TXB opcodes to implement this spec. TEX2 is required for shadow cube map arrays TXL2 is required for cube map array sampler + explicit lod TXB2 is required for cube map array sampler + lod bias Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: add in-place DB decompression and texturing with DB tilingMarek Olšák2012-11-061-1/+2
| | | | | | | | | | | | | | | | | | | | | The decompression is done in-place and only the compressed tiles are decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F. The texture unit is programmed to use non-displayable tiling and depth ordering of samples, so that it can fetch the texture in the native DB format. The latest version of the libdrm surface allocator is required for stencil texturing to work. The old one didn't create the mipmap tree correctly. We need a separate mipmap tree for stencil, because the stencil mipmap offsets are not really depth offsets/4. There are still some known bugs, but this should save some memory and it also improves performance a little bit in Lightsmark (especially with low resolutions; tested with Radeon HD 5000). The DB->CB copy is still used for transfers. Reviewed-by: Jerome Glisse <[email protected]>
* util: Make u_framebuffer.h C++ safe.José Fonseca2012-11-051-0/+8
|