aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/compiler
Commit message (Collapse)AuthorAgeFilesLines
* r300c/compiler: remove the compiler tooMarek Olšák2011-10-2861-17084/+0
| | | | Gallium has a fork of this.
* r300/compiler: simplify code in peephole_add_presub_addTobias Droste2011-07-251-17/+18
| | | | | Signed-off-by: Tobias Droste <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r300/compiler: remove an unused-but-set variable and simplify the codeMarek Olšák2011-07-151-9/+6
|
* r300/compiler: fix a warning that a variable may be uninitializedMarek Olšák2011-07-151-1/+1
|
* r300g: Fix non-dri buildsTom Stellard2011-05-282-1/+7
| | | | | This is just a temporary solution for now until there is a better way to share code between mesa and gallium.
* r300: move declaration before codeBrian Paul2011-05-191-1/+1
|
* r300/compiler: Fix bug in rc_get_variables()Tom Stellard2011-05-171-45/+13
| | | | | | | Variables that write to the same source select need to pe paired together otherwise the register allocator might fail. https://bugs.freedesktop.org/show_bug.cgi?id=36753
* r300/compiler: Use ALU Result for IF conditionalsTom Stellard2011-05-146-20/+212
| | | | This saves one instruction per IF.
* r300/compiler: Fix bug in rc_get_variables()Tom Stellard2011-05-111-7/+11
| | | | | | Variables that share readers were not always being linked together. https://bugs.freedesktop.org/show_bug.cgi?id=36939
* r300/compiler: Limit instructions to 3 source selectsTom Stellard2011-05-114-39/+104
| | | | | | | | | Some presubtract conversions were generating more than 3 source selects. https://bugs.freedesktop.org/show_bug.cgi?id=36527 Note: This is a candidate for the 7.10 branch.
* r300/compiler: Add simple unit test frameworkTom Stellard2011-05-117-0/+579
| | | | Plus three tests for rc_inst_can_use_presub()
* r300/compiler: align memory allocations to 8-bytesMatt Turner2011-05-091-1/+1
| | | | | | | | | Eliminates unaligned accesses on strict architectures. Spotted by Jay Estabrook. Signed-off-by: Matt Turner <[email protected]> NOTE: This is a candidate for the 7.10 branch.
* r300/compiler: implement TXD and TXL opcodesMarek Olšák2011-05-075-0/+52
|
* r300/compiler: remove set-but-unused variablesMarek Olšák2011-05-012-5/+1
|
* r300/compiler: Cleanups from the regalloc mergeTom Stellard2011-04-303-8/+4
|
* r300/compiler: Add return statement to rc_list()Tom Stellard2011-04-301-0/+2
|
* r300g: Fix scons buildTom Stellard2011-04-301-0/+1
| | | | | Broken by the dependency on ralloc introduced by fe622bac0c1b5b9f2a9fcf9f35b51232a06bea42
* r300/compiler: Enable swizzle packing in the allocator for r300 and r400Tom Stellard2011-04-306-41/+120
|
* r300/compiler: Handle loops in the register allocatorTom Stellard2011-04-304-19/+103
|
* r300/compiler: Handle loops in rc_get_readers()Tom Stellard2011-04-304-75/+150
|
* r300/compiler: Rewrite register allocatorTom Stellard2011-04-3018-236/+1547
| | | | | | | The new allocator uses ra and does swizzle packing. Also, a data structure (struct rc_variable) and associated functions have been added for generating UD and DU chains.
* r300/compiler: Use RC_MASK_W when converting RGB to Alpha instructionsTom Stellard2011-04-301-1/+1
|
* r300/compiler: rc_reader_data: Add ExitOnAbort flagTom Stellard2011-04-305-3/+10
|
* r300/compiler: Add more info to struct rc_readerTom Stellard2011-04-305-16/+41
| | | | | For pair instructions we need a reference to both the arg and source.
* r300/compiler: Add remove dead sources passTom Stellard2011-04-305-0/+66
| | | | | | | | The instruction scheduler will sometimes leave orphaned sources when converting instructions from RGB to Alpha. If one of these orphaned sources has an index greater than the maximum temporary register index, then the compiler will incorrectly report "Too many hardware temporaries used". The dead sources pass cleans up these orphaned sources.
* r300/compiler: fix up error messageMarek Olšák2011-04-221-2/+2
|
* mesa: Kill gl_fragment_program::FogOption with fireIan Romanick2011-04-211-2/+0
| | | | | | | | | | | | All drivers expect this to always be GL_NONE. Don't let there be any opportunity for a bad value to leak out and infect some unsuspecting driver. If any driver for hardware that had fixed-function per-fragment fog (i915 and perhaps some r300-ish) was ever going to add support, it would have done it by now. Reviewed-by: Eric Anholt <[email protected]> Acked-by: Corbin Simpson <[email protected]> Acked-by: Alex Deucher <[email protected]>
* r300/compiler: Fix dataflow analysis bug with ELSE blocksTom Stellard2011-04-181-0/+7
| | | | | | | Writes within ELSE blocks were being ignored which prevented us from discovering all possible writers for some register values. Fixes piglit glsl-fs-raytrace-bug27060
* r300/compiler: Fix incorrect presubtract conversionTom Stellard2011-04-161-0/+24
| | | | | | | ADD instructions with constant swizzles can't be converted to presubtract operations. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* Revert "r300/compiler: Don't try to convert RGB to Alpha in full instructions"Marek Olšák2011-04-151-2/+1
| | | | | | This reverts commit cd2857fae16e1352f39b37f611797e66619d3fe5. It breaks Unigine Heaven.
* r300/compiler: Don't try to convert RGB to Alpha in full instructionsTom Stellard2011-04-061-1/+2
| | | | Note: This is a candidate for the 7.10 branch.
* r300/compiler: Fix vertex shader MAD instructions with constant swizzlesTom Stellard2011-04-051-0/+18
| | | | NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300g: fix RG/LATC1_SNORM by doing UNORM->SNORM conversion in the shaderMarek Olšák2011-04-052-6/+60
|
* r300/compiler: implement the CND opcodeMarek Olšák2011-04-055-0/+15
| | | | No one uses it now, but I will need it for a lowering pass.
* r300/compiler: set the MSB of ADDR for inline constantsMarek Olšák2011-04-051-2/+5
| | | | The docs say so.
* r300/compiler: apply the texture swizzle to shadow pass and fail values tooMarek Olšák2011-04-041-8/+20
| | | | | | | | | | | | Piglit tests: - glsl-fs-shadow2d-01 - glsl-fs-shadow2d-02 - glsl-fs-shadow2d-03 - fs-shadow2d-red-01 - fs-shadow2d-red-02 - fs-shadow2d-red-03 NOTE: This is a candidate for the stable branches.
* r300/compiler: propagate SaturateMode down to the result of shadow comparisonMarek Olšák2011-04-041-0/+3
| | | | NOTE: This is a candidate for the stable branches.
* Revert "r300/compiler: Remove obsolete compiler passes"Tom Stellard2011-04-027-0/+415
| | | | | | | This reverts commit 9f013a8233197d4a0482661cb37cfeac1a61b804. These passes are still need for non-GLSL paths like g3dvl and ARB programs.
* r300/compiler: Remove obsolete compiler passesTom Stellard2011-03-317-415/+0
| | | | | | Branch emulation and loop unrolling are done in the GLSL frontend. Transforming loops is no longer needed for fragment shaders, but it is still necessary for vertex shaders.
* r300/compiler: Use a 4-bit writemask in pair instructionsTom Stellard2011-03-183-3/+4
| | | | | | | We now use a 4-bit writemask for all instruction types, which makes it easier to write generic helper functions to manipulte writemasks. NOTE: This is a candidate for the 7.10 branch.
* r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500Marek Olšák2011-03-121-1/+1
| | | | | | | | | | The docs say it can be set for direct texture lookups, but even that causes problems. This fixes the wireframe bug: https://bugs.freedesktop.org/show_bug.cgi?id=32688 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: TEX instructions don't support negation on source argumentsMarek Olšák2011-03-121-3/+0
| | | | | | | This fixes piglit: - glsl-fs-texture2d-dependent-4 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)Marek Olšák2011-03-122-9/+0
| | | | NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300/compiler: fix translating the src negate bits in pair_translateMarek Olšák2011-03-121-3/+8
| | | | | | | | | | | (1, -_, ...) was converted to (-1, ...) because of the negation in the second component. Masking out the unused bits fixes this. Piglit: - glsl-fs-texture2d-branching NOTE: This is a candidate for the 7.9 and 7.10 branches.
* r300g: implement fragment color clamping in the shaderMarek Olšák2011-03-122-0/+23
| | | | | This finishes the implementation of the fragment color clamp control for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...
* r300/compiler: fix the saturate modifier when applied to TEX instructionsMarek Olšák2011-03-121-1/+5
| | | | This bug can only be triggered if the source texture is either signed or float.
* r300/compiler: remove unused variablesMarek Olšák2011-03-081-1/+1
|
* r300/compiler: fix equal and notequal shadow compare functionsMarek Olšák2011-03-081-18/+16
|
* r300/compiler: detect constants harderMarek Olšák2011-03-081-4/+8
|
* r300/compiler: improve the detection of constants for constant foldingMarek Olšák2011-03-081-0/+7
| | | | Now the expression V==0 generates one instruction instead of two.