• Home
  • History
  • Annotate
  • only in /external/mesa3d/src/gallium/drivers/r300/compiler/
History log of /external/mesa3d/src/gallium/drivers/r300/compiler/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7f0fcf17c342dcb788c2182b20973c48806ee498 27-Aug-2012 Marek Olšák <maraeo@gmail.com> r300g: implement TRUNC correctly

This fixes some integer division tests.
adeon_opcodes.c
adeon_opcodes.h
adeon_program_alu.c
07c71d6ede4f2ad62bcaab8d3f84452485979e2e 24-Jun-2012 Tom Stellard <thomas.stellard@amd.com> r300/compiler: Use variable lists in the rename_regs pass
adeon_rename_regs.c
707f0679157f83ac45127e41647b96ed924d45c9 11-Aug-2012 Ian Romanick <ian.d.romanick@intel.com> mesa: Kill GL_ARB_shadow_ambient with fire

No driver supports this extension, and it seems unlikely than any driver
ever will. I think r300c may have supported it at one time, but that
driver has already been removed.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
adeon_compiler.h
adeon_program_tex.c
2f92a9f721b750f30a445fee4d8c9bd6479f6b04 16-Jul-2012 Brian Paul <brianp@vmware.com> r300g: silence uninitialized var warning
adeon_inline_literals.c
0b59909e78e96f1bd95d63050e988492b40b03ee 14-Apr-2012 Tom Stellard <thomas.stellard@amd.com> r300/compiler: Exit immediately from rc_vert_fc() if there is an error

This way we correctly report "Too many temporaries" errors.

https://bugs.freedesktop.org/show_bug.cgi?id=48680

Note: This is a candidate for the stable branches.
adeon_vert_fc.c
73249239cf71e3595ee19f3c1a02b8b0f58994cd 14-Apr-2012 Tom Stellard <thomas.stellard@amd.com> r300/compiler: Copy all instruction attributes during local transfoms

Instruction attributes like WriteALUResult and ALUResultCompare
were being discarded during the some of the local transformations.

This fixes the following piglit tests:

glsl1-inequality (vec2, pass)
loopfunc
fs-any-bvec2-using-if
fs-op-ne-bvec2-bvec2-using-if
fs-op-ne-ivec2-ivec2-using-if
fs-op-ne-mat2-mat2-using-if
fs-op-ne-vec2-vec2-using-if
fs-op-ne-mat2x3-mat2x3-using-if
fs-op-ne-mat2x4-mat2x4-using-if

https://bugs.freedesktop.org/show_bug.cgi?id=45921

NOTE: This is a candidate for the stable branches.
adeon_program_alu.c
b2df031a959f36743527b9abc89913ce4f895de3 21-Sep-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix nested flow control in r500 vertex shaders
3xx_vertprog.c
3xx_vertprog_dump.c
adeon_code.h
adeon_compiler.h
adeon_opcodes.c
adeon_opcodes.h
adeon_program.h
adeon_program_constants.h
adeon_program_print.c
adeon_vert_fc.c
befcce264c8bf8fdac233e6a01cadc595a1d11d3 14-Jan-2012 Tom Stellard <tstellar@gmail.com> r300/compiler: Add support for inline literals

On R500 chips, shader instructions can take 7-bit (3-bit mantissa, 4-bit
exponent) floating point values as inputs in place of registers.
3xx_fragprog.c
500_fragprog.c
500_fragprog_emit.c
adeon_compiler.c
adeon_compiler.h
adeon_dataflow.h
adeon_inline_literals.c
adeon_pair_translate.c
adeon_program_constants.h
adeon_program_pair.h
adeon_program_print.c
dab5f98404677bbbdbe3d5a82b607bfd4689b48e 01-Mar-2012 Brian Paul <brianp@vmware.com> r300g: init chan=0 to silence warning
adeon_optimize.c
e6fa2d89e14452b6bdf42c7eb4150fb2a2c46a4a 20-Feb-2012 Tom Stellard <tstellar@gmail.com> r300g: Use automake to generate Makefile v3

v2:
- s/$(top_builddir)/$(top_srcdir)/
- Always generate Makefile.in

v3:
- Fixes from Matt Turner
- Use Mesa CFLAGS
ests/.gitignore
ests/Makefile
edf33079771d61b093c6bffd98094b197915d758 24-Feb-2012 Tom Stellard <tstellar@gmail.com> r300g: Reorganize the compiler unit tests
ests/Makefile
ests/r300_compiler_tests.c
ests/r300_compiler_tests.h
ests/radeon_compiler_util_tests.c
7acbbc07048d85ee16b15b48a00e232cd26e2322 26-Feb-2012 Tom Stellard <tstellar@gmail.com> r300/compiler: Schedule KIL instructions before output writes
adeon_pair_schedule.c
134a0a5ff88851c971fb95863317f640b5b9fa3a 14-Feb-2012 Tom Stellard <tstellar@gmail.com> r300/compiler: Use the smart scheduler for r300 cards
adeon_pair_schedule.c
342cac71669662abad3435fd13ecf28d073874c3 14-Feb-2012 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix bug when lowering KILP on r300 cards

KILP instruction inside IF blocks were being lowered to an unconditional
KIL. Since r300 doesn't support branching, when the IF's were lowered
to conditional moves, the KIL would always be executed. This is not a
problem with the mesa state tracker, because the GLSL compiler handles
lowering IF's, but this bug was appearing in the VDPAU state tracker,
which does not use the GLSL compiler.

Note: This is a candidate for the stable branches.
adeon_program_alu.c
7023ed9e622a3a080ccc6a2739ba1ccd8775a345 23-Jan-2012 Marek Olšák <maraeo@gmail.com> r300g: nuke the fallback for fragment color clamping
3xx_fragprog.c
adeon_code.h
b972744c78e45928876ea781b9eeef09b3baf083 12-Jan-2012 Eric Anholt <eric@anholt.net> mesa: Make the register allocator allocation take a ralloc context.

This fixes a memory leak on i965 context destruction.

NOTE: This is a candidate for the 8.0 branch.
adeon_pair_regalloc.c
c77efc6bb63f7ff3f1ddf500e57beff5b317b9b1 04-Jan-2012 Marek Olšák <maraeo@gmail.com> r300/compiler: fix buffer underflow when setting SEM_WAIT on last instruction

Do it after we check whether inst_end != -1.
Also move the code structure at the beginning of r300_fragment_shader_code
to detect underflows easily with valgrind.
500_fragprog_emit.c
17a1c0cb0d9e04607c1726d04ef23485979dfc98 23-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix scheduler bug causing texture corruption

We weren't setting TEX_SEM_WAIT on instructions that read the value of a
TEX instruction and also wrote the same register as the TEX instruction.

This is the sequence we were miscompiling:

1: TEX temp[0], input[2].xy__, 2D[0]
...
16: src0.xyz = temp[22], src1.xyz = temp[0], src2.xyz = temp[19]
MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx

https://bugs.freedesktop.org/show_bug.cgi?id=42090
adeon_pair_schedule.c
53d32600cc1bf69e048ff6f75ead5ab3f627a3a5 15-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Try to eliminate REPL_ALPHA instructions

Scalar instruction that need to write to the xyz components of a
register must reserve the RGB instruction slot for a REPL_ALPHA
instruction. With this commit, the scheduler will attempt to free
the RGB slot by moving the write to the w component of a register.
adeon_pair_schedule.c
8327fd18c9e2e89629696fb8dea729c7f3c773b5 15-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: More agressive RGB to Alpha conversions
adeon_pair_schedule.c
653c7af3d6659ed824ae248e398ac4aec94e0a41 16-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Only convert RGB->Alpha when optimizations are enabled
3xx_fragprog.c
adeon_pair_schedule.c
0dc97e7fd49a5b8db25b95a1020fc598dba5cf65 14-May-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Enable reg rename pass on r500 and run it before optimizations

The scheduler and the register allocator are now smart enough to handle
it.
3xx_fragprog.c
163629fd05166b78d70c2c26f4a922b296e8999d 13-May-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Implement the texture semaphore

The texture semaphore allows for prefetching of texture data. On my
RV515, this increases the FPS of Lightsmark by 33% (This is with the
reg_rename pass enabled, which is enabled in the next commit).

There is a new env variable now called RADEON_TEX_GROUP, which allows
you to specify the maximum number of texture lookups to do at once.
The default is 8, but different values could produce better results
for various application / card combinations.
500_fragprog_emit.c
adeon_pair_schedule.c
adeon_program.h
adeon_program_pair.h
adeon_program_print.c
51fe9994bdec1625a27e12216d492916e64ab622 14-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Don't pair output writes with GPR writes in the scheduler
adeon_pair_schedule.c
6fafb6beb7df333cc2f7837407796c7970a6bfa6 14-May-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Prevent regalloc from creating non-native swizzles
adeon_pair_regalloc.c
47c75128460ae1c15dc050ac64fbfb4b05d0ab84 12-May-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Allow merged instructions to be scheduled on demand

We no longer emit full instructions immediately after they have been
merged. Instead merged instructions are added to the ready list and
the scheduler can commit them whenever it wants.
adeon_pair_schedule.c
d64c6d2ffc086bde7a025269b80c0980f7d908f1 02-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix error in OMOD optimization

Classic compiler mistake. In the example below, the OMOD optimization
was combining instructions 4 and 10, but since there was an instruction
(#8) in between them that wrote to the same registers as instruction 10,
instruction 11 was reading the wrong value.

Example of the mistake:

Before OMOD:
4: MAD temp[0].y, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
10: MUL temp[2].x, const[1].y___, temp[0].y___;
11: FRC temp[5].x, temp[2].x___;

After OMOD:
4: MAD temp[2].x / 8, temp[3]._y__, const[0]._x__, const[0]._y__;
...
8: ADD temp[2].x, temp[1].x___, -temp[4].x___;
...
11: FRC temp[5].x, temp[2].x___;

https://bugs.freedesktop.org/show_bug.cgi?id=41367
adeon_optimize.c
13814b0103812adbb5aba0dba4664249e8566290 02-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Rewrite source swizzles when using OMOD
adeon_optimize.c
8b0418e478f9def2783060d90d1b267a54a9c6c3 02-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix rc_normal_rewrite_writemask()

This function had not been updated to use conversion swizzles.
adeon_compiler_util.c
b5ecf5ba466c3e1872dc9281b01f4e59ca1a388b 02-Oct-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Use consistent src swizzles for transcendent instructions

Source swizzles for transcendent instructions were being stored in the X
channel regardless of what channel the instruction was writing.
This was causing problems for some helper functions that were expecting
source swizzles to occupy channels corresponding to the instruction's
writemask. This commit makes transcendent instructions follow the same
convention as normal instructions for representing source swizzles.

Previous behavior:
LG2 temp[0].y, input[0].x___;

Current behavior:
LG2 temp[0].y, input[0]._x__;
3xx_vertprog.c
adeon_compiler_util.c
adeon_compiler_util.h
adeon_opcodes.c
adeon_pair_translate.c
2d1004d9aa719bb93a4f057b0eefe88f23b44e44 19-Sep-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Fix regalloc for values with multiple writers

https://bugs.freedesktop.org/show_bug.cgi?id=40062
https://bugs.freedesktop.org/show_bug.cgi?id=36939

Note: This is a candidate for the 7.11 branch.
adeon_variable.c
e945fb04d04c33da5e77d22d739c5740a522a61e 15-Jun-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Add support for the output modifier (OMOD)
300_fragprog_emit.c
500_fragprog_emit.c
adeon_compiler.c
adeon_compiler.h
adeon_optimize.c
adeon_pair_schedule.c
adeon_pair_translate.c
adeon_program.h
adeon_program_constants.h
adeon_program_pair.h
adeon_program_print.c
adeon_variable.c
adeon_variable.h
1e5aaaa138d87a3e3bc53f6e4c18b1842b752dea 15-Jun-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Move some helper functions to radeon_compiler_util.c
adeon_compiler_util.c
adeon_compiler_util.h
adeon_emulate_loops.c
96620d2275894d1e021d403c0e40007c61269563 16-Sep-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Don't unroll loops that conditionally increment the counter
adeon_emulate_loops.c
3d32e589879806297258e36ea80aae5044293ca3 05-Sep-2011 Tom Stellard <tstellar@gmail.com> r300/compiler: Implement ROUND

According to the GLSL spec, the implementor can decide which way to round
when the fraction is .5. The r300 compiler will round down.
adeon_opcodes.c
adeon_opcodes.h
adeon_program_alu.c
32faaea743ca74f4ba29184ef44ebf2c0e962a46 09-Aug-2011 Brian Paul <brianp@vmware.com> r300g: silence some warnings about uninitialized variables
adeon_program_alu.c
adeon_program_tex.c
1c2c4ddbd1e97bfd13430521e5c09cb5ce8e36e6 26-Jul-2011 Marek Olšák <maraeo@gmail.com> r300g: copy the compiler from r300c

What a beast.

r300g doesn't depend on files from r300c anymore, so r300c is now left
to its own fate. BTW 'make test' can be invoked from the gallium/r300
directory to run some compiler unit tests.
emory_pool.c
emory_pool.h
300_fragprog.c
300_fragprog.h
300_fragprog_emit.c
300_fragprog_swizzle.c
300_fragprog_swizzle.h
3xx_fragprog.c
3xx_vertprog.c
3xx_vertprog_dump.c
500_fragprog.c
500_fragprog.h
500_fragprog_emit.c
adeon_code.c
adeon_code.h
adeon_compiler.c
adeon_compiler.h
adeon_compiler_util.c
adeon_compiler_util.h
adeon_dataflow.c
adeon_dataflow.h
adeon_dataflow_deadcode.c
adeon_dataflow_swizzles.c
adeon_emulate_branches.c
adeon_emulate_branches.h
adeon_emulate_loops.c
adeon_emulate_loops.h
adeon_list.c
adeon_list.h
adeon_opcodes.c
adeon_opcodes.h
adeon_optimize.c
adeon_pair_dead_sources.c
adeon_pair_regalloc.c
adeon_pair_schedule.c
adeon_pair_translate.c
adeon_program.c
adeon_program.h
adeon_program_alu.c
adeon_program_alu.h
adeon_program_constants.h
adeon_program_pair.c
adeon_program_pair.h
adeon_program_print.c
adeon_program_tex.c
adeon_program_tex.h
adeon_remove_constants.c
adeon_remove_constants.h
adeon_rename_regs.c
adeon_rename_regs.h
adeon_swizzle.h
adeon_variable.c
adeon_variable.h
ests/.gitignore
ests/Makefile
ests/radeon_compiler_util_tests.c
ests/rc_test_helpers.c
ests/rc_test_helpers.h
ests/unit_test.c
ests/unit_test.h