Commit Graph

15 Commits

Author SHA1 Message Date
Marek Olšák
e1c4e8aaaa gallium: remove TGSI_SAT_MINUS_PLUS_ONE
It's a remnant of some old NV extension. Unused.

I also have a patch that removes predicates if anyone is interested.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-05-20 15:40:46 +02:00
Stéphane Marchesin
4e861ac4a1 i915g: Add more optimizations
This patch adds liveness analysis to i915g and a couple
optimizations which benefit from it. One interesting
optimization turns (fake) indirect texture accesses into direct
texture accesses (the i915 supports a maximum of 4 indirect
texture accesses). Among other things this fixes a bunch of
piglit tests.
2013-09-04 12:11:02 -07:00
Brian Paul
46205ab8cc tgsi: rename the TGSI fragment kill opcodes
TGSI_OPCODE_KIL and KILP had confusing names.  The former was conditional
kill (if any src component < 0).  The later was unconditional kill.
At one time KILP was supposed to work with NV-style condition
codes/predicates but we never had that in TGSI.

This patch renames both opcodes:
  TGSI_OPCODE_KIL -> KILL_IF   (kill if src.xyzw < 0)
  TGSI_OPCODE_KILP -> KILL     (unconditional kill)

Note: I didn't just transpose the opcode names to help ensure that I
didn't miss updating any code anywhere.

I believe I've updated all the relevant code and comments but I'm
not 100% sure that some drivers had this right in the first place.
For example, the radeon driver might have llvm.AMDGPU.kill and
llvm.AMDGPU.kilp mixed up.  Driver authors should review their code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-07-12 08:32:51 -06:00
Stéphane Marchesin
841eee5d44 i915g: More ops commute.
This allows using the optimizations more broadly.
2012-06-15 20:22:26 -07:00
Stéphane Marchesin
3235435e80 i915g: Fix bugs in the shader optimizer. 2012-01-11 02:25:42 -08:00
Stéphane Marchesin
b50d250e02 i915g: Only apply the optimization to output vars.
This is a bit overkill, but otherwise we need to rename subsequent uses, which is a future TODO.
Reported by CME.
2011-12-27 17:08:26 -08:00
Stéphane Marchesin
687e62a5d7 i915g: Fix peephole optimization for MOVs. 2011-09-22 12:43:24 -07:00
Stéphane Marchesin
51f641291d i915g: Add an optimization to get rid of useless movs, in particular at the end of some shaders. 2011-09-21 18:01:43 -07:00
Stéphane Marchesin
9a15b1eb95 i915g: Fix bug in shader optimizer. 2011-09-21 18:01:39 -07:00
Stéphane Marchesin
9baad92660 i915g: Make optimization more generic. 2011-07-07 16:57:37 -07:00
Stéphane Marchesin
f934c80faf i915g: Apply optimization to ADDS/MUL and only if we're not saturating. 2011-07-07 01:47:33 -07:00
Brian Paul
7a10976adb i915g: move code after declaration 2011-07-06 18:10:00 -06:00
Stéphane Marchesin
31484b068d i915g: Fix optimize so that it actually gets used. 2011-07-06 14:18:24 -07:00
Stéphane Marchesin
053af6ac8c i915g: Fix optimization, also make it more generic. 2011-07-06 12:00:47 -07:00
Stéphane Marchesin
2bc5e0e97b i915g: introduce the tiny shader optimizer. 2011-07-06 02:49:48 -07:00