summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* build: Don't build pipebufferMatt Turner2013-01-102-19/+0
| | | | It's already built by src/gallium/auxiliary.
* libgallium: Convert to automakeTom Stellard2013-01-103-47/+53
|
* 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.
* gallivm: support more immediates in lp_build_tgsi_info()Brian Paul2013-01-041-1/+1
| | | | | | Bump limit from 32 to 128. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=58545
* 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 <brianp@vmware.com>
* gallium/util: remove unused helper util_create_rgba_textureMarek Olšák2013-01-042-61/+0
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube indexMarek Olšák2013-01-041-0/+5
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/u_blitter: minor simplificationMarek Olšák2013-01-041-10/+11
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/u_blitter: unify some parameters into a dstbox parameter in blit_genericMarek Olšák2013-01-042-20/+25
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/u_blitter: remove useless parameter from blitter_default_dst_textureMarek Olšák2013-01-042-7/+5
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/util: complete implementation of util_dump_transferMarek Olšák2013-01-041-4/+5
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <sroland@vmware.com>
* gallivm: fix conversion for pure integer formatsRoland Scheidegger2012-12-181-0/+1
| | | | | | | | | | | Since the idea is to just expand or shrink the bit width but not otherwise do conversion we also need to adjust the sign bit according to src, otherwise the conversion code will incorrectly clamp the values. (Since this only works for casting to ordinary floats the norm and fixed bits should always be fine.) This fixes the remaining piglit attribs GL3 failures. Reviewed-by: José Fonseca <jfonseca@vmware.com>
* gallivm: fix texel fetch for array textures (2)Roland Scheidegger2012-12-171-2/+3
| | | | | | | | a460aea3f14222af46f88d1bc686f82180b8a872 wasn't entirely correct, since all coords are already ints hence need to skip the iround. Passes piglit texelFetch with sampler1DArray/sampler2DArray. Reviewed-by: Dave Airlie <airlied@redhat.com>
* 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 <hverbeet@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
* draw/llvmpipe: fix transform feedback position + enable other extensionsDave Airlie2012-12-145-7/+26
| | | | | | | | | | | | | | | | This builds on the previous draw/softpipe patch. So llvmpipe does streamout calls after clip/viewport stages, but we have the pre-clip position stored for later use, so when we are doing transform feedback, and its the position vertex grab the vertex from the stored pre clip position. The perfect fix is too probably add a codegen transform feedback stage in between shader and clip stages, but this is good enough for now. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: add support for later transform feedback extensionsDave Airlie2012-12-142-5/+16
| | | | | | | | | | | | | | | | | This adds support to draw for the new features of transform feedback. a) fix count_from_stream_output, using max_index+1 for now but it looks like it should be valid as its derived from the vertex elements/vbo. b) fix striding and dst offsets in output buffers - was just wrong before. c) fix crash if tfb is suspended (so.num_targets == 0) This also enables the new features on softpipe. It should be possible to enable them on llvmpipe as well after this commit, but would need to schedule piglit runs. Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallivm: fix texel fetch for array texturesRoland Scheidegger2012-12-131-17/+38
| | | | | | | | | | Since we don't call lp_build_sample_common() in the texel fetch path we missed the layer fixup code. If someone would have tried to do texelFetch with array textures it would have crashed for sure. Not really tested (can't run the piglit test being able to use texelFetch with array samplers for now with llvmpipe). Reviewed-by: José Fonseca <jfonseca@vmware.com>
* gallium/util: add a simple allocator for suballocating from a large bufferMarek Olšák2012-12-123-0/+181
| | | | | Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-1214-40/+15
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/util: move util_try_blit_via_copy_region to u_surface.cMarek Olšák2012-12-124-157/+164
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/cso: don't use the pipe_error return type where it's not neededMarek Olšák2012-12-122-41/+24
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: manage render condition in cso_context and fix postprocessing w/ itMarek Olšák2012-12-125-0/+40
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* util: add util_copy_constant_buffer() helper functionBrian Paul2012-12-111-0/+20
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallivm: Lower TGSI_OPCODE_MUL to fmul by defaultTom Stellard2012-12-101-2/+3
| | | | | | | This fixes a number of crashes on r600g due to the fact that lp_build_mul assumes vector types when optimizing mul to bit shifts. This bug was uncovered by 0ad1fefd6951aa47ab58a41dc9ee73083cbcf85c
* llvmpipe: fix txq for 1d/2d arrays. (v3)Dave Airlie2012-12-111-2/+15
| | | | | | | | | | | | | | | | | Noticed would fail, we were doing two things wrong a) 1d arrays require the layers in height b) minifying the layers field. v2: don't change height code, fixup completely inside txq as suggested by Roland. v3: just add minify before texture array size v1: Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* llvmpipe: increase texture target width to reflect increaseDave Airlie2012-12-111-1/+1
| | | | | | | Now that we've gone over 7. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: fix/improve dirty state validationBrian Paul2012-12-088-23/+68
| | | | | | | | | | | | | | | | | | | | This patch does two things: 1. Constant buffer state changes were broken (but happened to work by dumb luck). The problem is we weren't calling draw_do_flush() in draw_set_mapped_constant_buffer() when we changed that state. All the other draw_set_foo() functions were calling draw_do_flush() already. 2. Use a simpler state validation step when we're changing light-weight parameter state such as constant buffers, viewport dims or clip planes. There's no need to revalidate the whole pipeline when changing state like that. The new validation method is called bind_parameters() and is called instead of the prepare() method. A new DRAW_FLUSH_PARAMETER_CHANGE flag is used to signal these light-weight state changes. This results in a modest but measurable increase in FPS for many Mesa demos. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: add reminder comments about similar code in different filesBrian Paul2012-12-082-0/+11
| | | | | | | | When one function is changed, also look at the other. Presently, there are some differences with respect to geometry shaders and instanced drawing... Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: rearrange code in llvm_middle_end_prepare()Brian Paul2012-12-081-66/+74
| | | | | | | To clean it up and make it look more like the non-LLVM fetch_pipeline_prepare() function. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: fix comment typoBrian Paul2012-12-081-1/+1
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: add comment on draw->pt.opt fieldBrian Paul2012-12-081-1/+1
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* draw: update a comment about index buffersBrian Paul2012-12-081-3/+2
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/os: Fix nano->micro second concersion.José Fonseca2012-12-081-1/+1
| | | | | | copy'n'paste: best friend, worst enemy.. Trivial.
* gallivm: Rudimentary native integer support.José Fonseca2012-12-072-5/+20
| | | | | | | | | Just enough for draw module to work ok. This improves "piglit attribs GL3", though something fishy is still happening with certain unsigned integer values. Reviewed-by: Brian Paul <brianp@vmware.com>
* draw: Dump LLVM shader key.José Fonseca2012-12-072-1/+33
| | | | | | Just like we do in llvmpipe for the fragment shader compilation key. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallivm: Allow indirection from TEMP registers too.José Fonseca2012-12-071-3/+18
| | | | | | | | The ADDR file is cumbersome for native integer capable drivers. We should consider deprecating it eventually, but this just adds support for indirection from TEMP registers. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallivm,llvmpipe,draw: Support multiple constant buffers.José Fonseca2012-12-075-15/+37
| | | | | | | | | | | Support 16 (defined in LP_MAX_TGSI_CONST_BUFFERS) as opposed to 32 (as defined by PIPE_MAX_CONSTANT_BUFFERS) because that would make the jit context become unnecessarily large. v2: Bump limit from 4 to 16 to cover ARB_uniform_buffer_object needs, per Dave Airlie. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/u_blitter: fix conflict with u_memory.hMarek Olšák2012-12-071-1/+5
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* gallium/util: Move the util_copy/fill_rect into u_surface.José Fonseca2012-12-065-187/+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 <brianp@vmware.com>
* gallium/os: Cleanup up os_time_get/os_time_get_nano.José Fonseca2012-12-062-21/+19
| | | | | | | | - Re-implement os_time_get in terms of os_time_get_nano() for consistency - Use CLOCK_MONOTONIC as recommended - Only use clock_gettime on Linux for now. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/os: Fix os_time_sleep() on Windows for small durations.José Fonseca2012-12-061-1/+5
| | | | | | Prevents undetermined sleeps. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallivm: Fix lerping of (un)signed normalized numbers.José Fonseca2012-12-061-49/+43
| | | | | | | | | | | | | | | | | | Several issues actually: - Fix a regression in unsigned normalized in the rescaling [0, 255] to [0, 256] - Ensure we use signed shifts where appropriate (instead of unsigned shifts) - Refactor the code slightly -- move all the logic inside lp_build_lerp_simple(). This change, plus an adjustment in the tolerance of signed normalized results in piglit fbo-blending-formats fixes bug 57903 Reviewed-by: Brian Paul <brianp@vmware.com>
* gallivm: Fix lp_build_print_value of smaller integer types.José Fonseca2012-12-061-1/+12
| | | | | | | They need to be converted to the native integer type to prevent garbage in higher order bits from being printed. Reviewed-by: Brian Paul <brianp@vmware.com>
* draw: remove some dead constant buffer codeBrian Paul2012-12-064-82/+0
| | | | | | | | | Remove the draw_vs_set_constants() and draw_gs_set_constants() functions and the draw->vs.aligned_constants, draw->vs.aligned_constant_storage and draw->vs.const_storage_size fields. None of it was used. Reviewed-by: José Fonseca <jfonseca@vmware.com>