OSDN Git Service

glsl: Add implementation of inverse() for mat2/3/4.
authorEric Anholt <eric@anholt.net>
Wed, 18 Apr 2012 18:00:44 +0000 (11:00 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 24 Apr 2012 17:15:47 +0000 (10:15 -0700)
commite9df9636b986b09ba37095d963b388571f528e1b
treeffdcab788c28dfdcb0d9c89e19293c2872deb78a
parent7de1331662816d31fb9bed423b1e5372284a260e
glsl: Add implementation of inverse() for mat2/3/4.

This is taken from the ogl-math project, with Inverse renamed to adj
(since it's not actually the inverse), transposed, and our types
plugged in.  There are potential CSE opportunities in this code
(particularly for hardware with RCP but not DIV), but we should be
doing CSE anyway, so don't hand-optimize.

Fixes piglit inverse tests.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/Makefile
src/glsl/builtins/glsl/inverse.glsl [new file with mode: 0644]
src/glsl/builtins/profiles/140.glsl