summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
Commit message (Collapse)AuthorAgeFilesLines
* Revert "gallivm: Change getExtent and readByte to non-const with llvm-3.1."Vinson Lee2012-03-011-8/+0
| | | | | | | | | This reverts commit d5a6c172547d8964f4d4bb79637651decaf9deee. llvm-3.1svn r151687 makes MemoryObject accessor members const again. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Update comments and prototype of vector-selects.José Fonseca2012-03-011-20/+31
| | | | | No runtime behavior change. As vector selects are still not very well supported by LLVM.
* gallivm: add major integer opcodes to the tgsi action handlerDave Airlie2012-02-281-1/+382
| | | | | | | | | | | | | | | This adds support for all the opcodes needed for native integer support with GLSL 1.20 enabled, and some of the ones for GLSL1.30 support. I've split them between non-cpu and cpu along the same lines Tom's code did for the other ones I think, but I'm open to review on which ones should go where. With instance ids fixed I get no regressions on my box here with LLVM 2.8, will test with later LLVMs as well. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: drop deprecated opcodesDave Airlie2012-02-281-8/+0
| | | | | | These are integer opcodes not deprecated ones. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: only do rcp/mul for floatingDave Airlie2012-02-281-1/+2
| | | | | | | rcp asserts on type.floating so don't go passing non-floating things into it. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add frem support to the lp_build_mod helper.Dave Airlie2012-02-281-1/+2
| | | | | | for completeness. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add bitarit xor and not ops.Dave Airlie2012-02-282-0/+49
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add integer and unsigned mod arit functions. (v2)Dave Airlie2012-02-282-0/+25
| | | | | | use a single entry point, as per Jose's suggestion. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: Fix TGSI_OPCODE_ARR's translation.José Fonseca2012-02-212-2/+21
| | | | | | | | | | | | | Like TGSI_OPCODE_ARL, destination should be an integer. This fixes invalid LLVM IR on an internal state tracker (currently Mesa never emits this opcode). In the future consider making ADDR register also a integer-as-float array, like all other register kinds, or simply replace ADDR & ARR/ARL with integer temp and instructions. Reviewed-by: Dave Airlie <[email protected]>
* llvmpipe: Don't assume vector is 4 wide in lp_build_sin()/lp_build_cos()José Fonseca2012-02-201-81/+60
| | | | Reviewed-by: Dave Airlie <[email protected]>
* gallivm: fetch immediates to correct type (v2)Dave Airlie2012-02-171-3/+22
| | | | | | | | Fetch float/uint/int immediates. v2: bitcast to uint/int to floats as per Jose's suggestions. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: enable stores of integer types. (v2) + fix ARLDave Airlie2012-02-172-11/+59
| | | | | | | | | | | | | | | Infer from the operand the type of value to store. MOV is untyped but we use the float store path. v2: make MOV use float store path. I've had to squash merge the ARL fix to be stored as an integer in here to avoid regressions in a number of piglit tests. From now on ARL stores to an integer just like HW does. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: enable fetch for integer opcodes. (v2)Dave Airlie2012-02-174-16/+74
| | | | | | | | | | | The infers the type of data required using the opcode, and casts the input to the appropriate type. So far this only handles non-indirect constant and temporaries. v2: as per Jose suggestion, fetch immediates via floats Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add uint/int bld to the base builder. (v2)Dave Airlie2012-02-173-9/+12
| | | | | | | | These are used inside the action handlers for the integer opcodes. v2: use uint_bld/int_bld, drop higher level uint_bld. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: fix build gather to take a bld contextDave Airlie2012-02-171-8/+8
| | | | | | Then pass the correct build context to it. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: pass build context to exec_mask_store.Dave Airlie2012-02-171-5/+9
| | | | | | | For now just pass the current context, but when we want to store int or unsigned we need to pass those later. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: Initialize x86 disassembler on x86_64 too.José Fonseca2012-02-171-2/+2
|
* gallivm: Replace architecture test with PIPE_ARCH_*Stéphane Marchesin2012-02-121-4/+6
| | | | | | | | | | | | X86Target is a variable, and therefore isn't defined at compile time. So LLVM_NATIVE_ARCH == X86Target is translated into 0 == 0 and since X86 is first, we always pick it. Therefore we replace the logic with PIPE_ARCH_*. https://bugs.freedesktop.org/show_bug.cgi?id=45420
* gallivm: Change getExtent and readByte to non-const with llvm-3.1.Vinson Lee2012-02-101-0/+8
| | | | | | | | | | | Fix build with llvm-3.1svn. llvm-3.1svn r149918 changed BufferMemoryObject::getExtent and BufferMemoryObject::readByte from const member functions to non-const member functions in include/llvm/Support/MemoryObject.h. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallivm: Fix LLVM-2.7 build.ojab2012-02-021-4/+6
| | | | | Signed-off-by: José Fonseca <[email protected]> Tested-by: Vinson Lee <[email protected]>
* gallivm: Remove MSVC RT hack.José Fonseca2012-02-021-14/+0
| | | | | The hack never worked reliably, and docs/llvmpipe.html is quite clear on the requirement of matching CRT when building LLVM and Mesa already.
* Initialize only native LLVM Disassembler.ojab2012-01-311-1/+5
| | | | Signed-off-by: José Fonseca <[email protected]>
* gallivm: Don't use C99 member initializers.José Fonseca2012-01-301-26/+26
|
* gallivm: Move declaration before code.José Fonseca2012-01-301-2/+2
|
* gallivm: Add a new interface for doing TGSI->LLVM conversionsTom Stellard2012-01-306-1652/+2952
| | | | | | | | | | | lp_bld_tgsi_soa.c has been adapted to use this new interface, but lp_bld_tgsi_aos.c has only been partially adapted, since nothing in gallium currently uses it. v2: - Rename lp_bld_tgsi_action.[ch] => lp_bld_tgsi_action.[ch] - Initialize tgsi_info in lp_bld_tgsi_aos.c - Fix copyright dates
* gallium: Move duplicated helper macros to tgsi_exec.hTom Stellard2012-01-301-116/+103
|
* gallium: Unify defines of CHAN_[XYZW] in tgsi_exec.hTom Stellard2012-01-301-147/+144
|
* gallivm: Add function lp_bld_gather_values()Tom Stellard2012-01-302-0/+21
|
* gallivm: Swizzle constants into the right AoS ordering.Brian Paul2012-01-271-1/+1
| | | | | | | | Constants array is always assumed to be RGBA, which means we need to swizzle the constant elements into place to match the AoS ordering (e.g., BGRA) that was passed to lp_build_tgsi_aos(). Signed-off-by: José Fonseca <[email protected]>
* gallivm: Allow target specific intrinsics in lp_declare_intrinsic()Tom Stellard2012-01-131-7/+0
| | | | | Target specific intrinsics are also prefixed with llvm, so this assert was preventing us from using them.
* tgsi: consolidate TGSI string arrays in new tgsi_strings.hBrian Paul2012-01-051-0/+1
| | | | | | | | | | There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]>
* gallivm: Close a memory leakLauri Kasanen2011-12-221-0/+1
| | | | | | | | | | | | | | | | Hi all This fixes a memory leak of 32 bytes on exit. From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <[email protected]> Date: Thu, 22 Dec 2011 21:28:33 +0200 Subject: [PATCH] gallivm: Close a memory leak As reported by "valgrind --leak-check=full glxgears". Signed-off-by: Lauri Kasanen <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* gallivm: Fix build with llvm-3.1svn.Vinson Lee2011-12-162-1/+15
| | | | | | | | | llvm-3.1svn r145714 moved global variables into a new TargetOptions class. TargetMachine constructor now needs a TargetOptions object as well. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Trim the fragment shader cached based on LLVM IR instruction count.José Fonseca2011-12-082-0/+29
| | | | | | | | | | | | Number of fragment shader variants is not very representative of the memory used by LLVM, neither is number of shader instructions, as often texture sampling constitutes most of the generated code. This change adds an additional trim criteria: least recently used fragment shader variants will be freed until the total number of LLVM IR instruction falls below a specified threshold. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Remove duplicate statement.José Fonseca2011-11-141-2/+0
| | | | | | ary_ge_arx_arz is already set earlier. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Include stddef.h before the LLVM C++ headers.José Fonseca2011-11-142-0/+4
| | | | | Necessary with build against LLVM 2.6, with recent gcc, as LLVM headers depend on ptrdiff_t but don't properly include stddef.h
* llvmpipe: fix typo in the depth sampling aos code.Dave Airlie2011-11-061-1/+1
| | | | | | Just found by reading llvmpipe code for no great reason. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: change sys::getHostTriple to sys::getDefaultTargetTriple for LLVM ↵Christian Inci2011-11-061-0/+4
| | | | | | | | >= 0x0301 LLVM change r143502 Signed-off-by: José Fonseca <[email protected]>
* llvmpipe: Remove unsed variables.José Fonseca2011-10-312-6/+1
|
* gallivm: added lp_build_print_ivec4() functionBrian Paul2011-10-232-0/+24
|
* gallivm: Eliminate tgsi_util_get_full_src_register_sign_mode call.José Fonseca2011-10-161-11/+3
| | | | | It complicates more than it simplifies, now that there's only one negate bit on TGSI registers.
* llvmpipe: Use lp_build_ifloor_fract for exp2 calculation.José Fonseca2011-10-161-5/+1
| | | | | | | Instead of separate ifloor / fract calls. No change for SSE4.1 code, but less FP<->SI conversions on non SSE4.1 systems.
* gallivm: fix build with llvm 3.0svnBrian Paul2011-09-211-2/+8
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=41065
* gallivm: fix build with LLVM 3.0svnTobias Droste2011-09-151-1/+10
| | | | | | | | | LLVM 3.0svn added SubtargetInfo as additional parameter to createMCDisassembler() and createMCInstPrinter(). See revision 139237 of LLVM. Signed-off-by: Tobias Droste <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallivm: remove unused varsBrian Paul2011-09-131-5/+0
|
* gallium: add shadow 1D and 2D array samplers to TGSIMarek Olšák2011-09-102-0/+12
| | | | And filling in all the switch statements in auxiliary. Mostly untested.
* gallivm: fix build with LLVM 3.0svnTobias Droste2011-09-051-4/+10
| | | | | | | LLVM 3.0svn moved TargetRegistry.h and TargetSelect.h. See revision 138450 of LLVM. Signed-off-by: Tobias Droste <[email protected]>
* gallivm: Add a note about log2 computation and denormalized numbers.José Fonseca2011-07-221-0/+6
|
* gallivm: Fix lp_build_exp2 order 4-5 polynomial coefficients and bump order.José Fonseca2011-07-221-12/+12
| | | | | | | Not sure how I computed these, but they were wrong (which explains why bumping the polynomial order before never improved precision). This allows to pass the EXP test cases of PSPrecision/VSPrecision DCTs.
* gallivm: Increase lp_build_rsqrt() precision.José Fonseca2011-07-221-1/+1
| | | | | | | Add an iteration step, which makes rqsqrt precision go from 12bits to 24, and fixes RSQ/NRM test case of PSPrecision/VSPrevision DCTs. There are no uses of this function outside shader translation.