summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* u_blitter: unify clear_depth_stencil and flush_depth_stencilMarek Olšák2010-08-122-48/+0
| | | | No need to enable depth test for clear.
* u_staging: remove useless inline keywordLuca Barbieri2010-08-111-1/+1
|
* translate: allow clients to ask for supported output formatsLuca Barbieri2010-08-113-0/+88
| | | | | | | | | | | | | Currently translate asserts on unsupported output formats, making it impossible to use for some purposes, such as testing whether it actually works on all formats it supports. Removing the assert was met with opposition, so this change allows clients to ask whether an output format is supported, and they are thus able to avoid attempting to use it. Since this is just an addition to the API, no adverse effect is possible, and it makes the testsuite work again.
* auxiliary: Make u_staging.c MSVC compatible.Vinson Lee2010-08-111-3/+5
| | | | Fixes MSVC build.
* auxiliary: Add u_staging.c to SCons build.Vinson Lee2010-08-111-0/+1
| | | | | This is a follow-up to commit b85c71d4e1e4ed788be834dff5b7b3c0cd0402ac which added u_staging.c to make.
* gallivm: Fix and enable the extra Newton/Raphson step in lp_build_rcp().José Fonseca2010-08-111-2/+2
| | | | Thanks to Michal for spotting this.
* Revert "translate_generic: return NULL instead of assert(0) if format not ↵Luca Barbieri2010-08-111-6/+9
| | | | | | | | | | | supported" This reverts commit 16b45ca7cefb3432b4133fe9d0b1dbfe3f286131. José Fonseca asked for a revert. Note that the testsuite will now segfault since it attempts to test all possible formats.
* translate_generic: fix broken A8R8G8B8_UNORM outputLuca Barbieri2010-08-111-3/+9
| | | | | | | translate was attempting to output A8R8G8B8_UNORM as if it were R8G8B8A8_UNORM. Now the tests just added pass.
* translate_generic: return NULL instead of assert(0) if format not supportedLuca Barbieri2010-08-111-9/+6
| | | | This gives the caller a chance to recover (or crash anyway otherwise).
* auxiliary: fix util_framebuffer_copyLuca Barbieri2010-08-111-2/+4
| | | | | | | | | util_framebuffer_copy was attempting to copy all elements of the source framebuffer state. However, this breaks if the user does not zero initialize the structure. Instead, only copy the elements up to nr_cbufs, and clear elements up to dst->nr_cbufs, if the destination was larger than the source.
* gallivm: Use lp_build_div instead of lp_build_mul + lp_build_rcp.José Fonseca2010-08-111-2/+1
| | | | | | | Single divide, so let lp_build_div decide how to implement this. This will save a multiplication in architectures which don't have a RCP intrinsic.
* gallivm: Use unsigned shift in lp_build_minify.José Fonseca2010-08-111-1/+1
| | | | Texture dimensions are unsigned.
* util: copy the u_staging commit message to the codeMarek Olšák2010-08-111-1/+9
|
* auxiliary: support for transfers using staging resourcesLuca Barbieri2010-08-113-0/+123
| | | | | | | | | | | Direct3D 10/11 has no concept of transfers. Applications instead create resources with a STAGING or DYNAMIC usage, copy between them and the real resource and use Map to map the STAGING/DYNAMIC resource. This util module allows to implement Gallium drivers as a Direct3D driver would be implemented: transfers allocate a resource with PIPE_USAGE_STAGING, and copy the data between it and the real resource with resource_copy_region.
* u_surfaces: add util_surfaces_peekLuca Barbieri2010-08-111-0/+13
| | | | Used to find out if a surface exists without creating one.
* u_surfaces: use cso_hash instead of util_hash_tableLuca Barbieri2010-08-112-53/+31
| | | | | Using cso_hash directly is the right thing since util_hash_table adds useless overhead and is harder to use for this application.
* u_surfaces: fix surface leak due to off by oneLuca Barbieri2010-08-111-1/+1
|
* auxiliary: make primitive splitter assert on unimplemented adjacency primsLuca Barbieri2010-08-111-1/+4
| | | | | They are unimplemented, even though the framework makes it possible to implement them well, and nv50 needs them.
* auxiliary: fix u_split_prim naming conventionLuca Barbieri2010-08-111-3/+3
| | | | Current practice is to start identifiers with "util_" instead of "u_".
* auxiliary: move Ben Skeggs' primitive splitter to common codeLuca Barbieri2010-08-111-0/+102
| | | | | | | | | | | | | | | | | | | | | This is a simple framework that handles splitting primitives in an abstract way. The user has to specify the primitive start, start index and count. Then, it can ask the primitive splitter to "draw" a chunk of the primitive, staying under a given vertex/index budget. The primitive splitter will then call user-supplied functions to emit a range of vertices/indices, as well as switch the edgeflag on or off. This is particularly useful for hardware that either has limits on the vertex count field, or where vertices are pushed on a FIFO or temporary buffer of limited size. Note that unlike other splitters, it does not manipulate data in any way, and merely asks a callback to do so, in vertex intervals.
* util: Add util_format_srgb().José Fonseca2010-08-101-0/+38
| | | | To convert RGB -> SRGB format.
* gallivm: fix non-SSE4.1 case in lp_build_pack2()Brian Paul2010-08-101-5/+9
| | | | | | | Since there's no SSE instruction for this case, fall through to the generic shuffle code. Fixes bug fd.o 29468.
* gallivm: Fix bitwise operations for floats, division for integersnobled2010-08-102-5/+27
| | | | | | http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <[email protected]>
* gallivm: Even more type checkingnobled2010-08-102-1/+26
| | | | | | http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <[email protected]>
* gallivm: More type checks.José Fonseca2010-08-091-0/+43
|
* gallivm: Don't call LLVMBuildFNeg on llvm-2.6.José Fonseca2010-08-092-9/+4
| | | | It didn't exist yet.
* gallivm: Always use floating-point operators for floating-point typesnobled2010-08-097-92/+137
| | | | | | | | | | | | | | | | | This fixes the assert added in LLVM 2.8: assert(getType()->isIntOrIntVectorTy() && "Tried to create an integer operation on a non-integer type!") But it also fixes some subtle bugs, since we should've been doing this since LLVM 2.6 anyway. Includes a modified patch from [email protected] for the FNeg instructions in emit_fetch(); thanks for pointing those out. http://bugs.freedesktop.org/29404 http://bugs.freedesktop.org/29407 Signed-off-by: José Fonseca <[email protected]>
* util: Move _mm_shuffle_epi8() to u_sse.h.José Fonseca2010-08-091-0/+29
| | | | It's bound to be useful elsewhere.
* gallivm: Fix more integer operations.José Fonseca2010-08-081-2/+4
|
* gallivm: Use the correct context for integersnobled2010-08-081-1/+1
| | | | | See: http://bugs.freedesktop.org/29407
* gallivm: Add type checks for the basic operations.José Fonseca2010-08-081-0/+12
|
* draw: Remove unused variable.José Fonseca2010-08-081-4/+2
|
* draw: Use the correct type for integersnobled2010-08-081-4/+2
| | | | | | | | Two integers were being operated on as a vector of floats in draw_llvm_generate(). This bug got uncovered by fixing this bug: http://bugs.freedesktop.org/29407
* gallium: remove stray semicolonsBrian Paul2010-08-063-3/+3
|
* draw: Add an assertion to varray's version of trim().Chia-I Wu2010-08-071-1/+6
| | | | | | Assert that "first" is always smaller than "count" and add reasoning. It would be better to simply fix trim(), but it is used in tight loops right now.
* draw: Fix draw_pt_split_prim for primitives with adjacency.Chia-I Wu2010-08-071-3/+3
| | | | Some primitives with adjacency have their "incr" wrong.
* draw: Assert that only the first vetex may have flags set.Chia-I Wu2010-08-071-13/+23
| | | | | | 642d5ba79abc6a231a5fdabb3454b9b082b0d7f8 removed flags masking for vertices other than the first one. Add assertions to be on the safe side.
* draw: Avoid mixed declarations and code.Chia-I Wu2010-08-063-4/+4
| | | | | | | Do not expand LOCAL_VARS to void expression. Otherwise, declarations and code will be mixed when more variables are declared in FUNC_ENTER. This fixes fdo bug #29416.
* draw: Remove unnecessary vertex flag ANDs.Chia-I Wu2010-08-061-19/+15
| | | | | Vertex flags are a contract between vcache and the pipeline. They are set only for the first vertex of a primitive.
* draw: Mask out vertex flags in GS and stream output.Chia-I Wu2010-08-062-2/+2
| | | | This fixes out-of-bound access to the vertices.
* draw: Include draw_decompose_tmp.h in draw_pt_decompose.h.Chia-I Wu2010-08-062-296/+36
| | | | Use draw_decompose_tmp.h to replace pipeline primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_so_emit_tmp.h.Chia-I Wu2010-08-062-138/+38
| | | | Use draw_decompose_tmp.h to replace stream out primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_gs_tmp.h.Chia-I Wu2010-08-062-171/+39
| | | | Use draw_decompose_tmp.h to replace GS primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_pt_vcache_tmp.h.Chia-I Wu2010-08-062-252/+92
| | | | | | Use draw_decompose_tmp.h to replace vcache primitive decomposer. As the new decomposer supports primitives with adjacency, vcache_triangle_adj and vcache_line_adj (and their variants that have flags) are added.
* draw: Add draw_decompose_tmp.h.Chia-I Wu2010-08-061-0/+425
| | | | | | | Including draw_decompose_tmp.h defines a primitive decomposer. It is intended to replace the existing vcache/so/gs/pipe decomposers. This is based on draw_pt_vcache_tmp.h.
* tgsi: Fix typo, so we follow what is in the commentsJakob Bornecrantz2010-08-051-1/+1
|
* tgsi: Add option to stop the sanity checker from printingJakob Bornecrantz2010-08-052-1/+15
|
* util: Add option to not dump cpu capsJakob Bornecrantz2010-08-051-17/+22
|
* gallivm: Only get debug option onceJakob Bornecrantz2010-08-051-1/+3
|
* r300g: implement hyper-z support. (v4)Dave Airlie2010-08-052-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | This implements fast Z clear, Z compression, and HiZ support for r300->r500 GPUs. It also allows cbzb clears when fast Z clears are being used for the ZB. It requires a kernel with hyper-z support. Thanks to Marek Olšák <[email protected]>, who started this off, and Alex Deucher at AMD for providing lots of hints. v2: squashed zmask ram size fix] squashed r300g/blitter: fix Z readback when compressed] v3: rebase around texture changes in master - .1 fix more bits v4: migrated to using u_mm in r300_texture to manage hiz/zmask rams consistently disabled HiZ when using OQ flush z-cache before turning hyper-z off update hyper-z state on dsa state change store depthclearvalue across cbzb clears and replace it afterwards. Signed-off-by: Dave Airlie <[email protected]>