From 73b7c6fb336ad3e717f8e961f4e2df761e94cd2f Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sat, 7 Aug 2010 03:47:25 +0200 Subject: nvfx: refactor sampling code, add support for swizzles and depth tex This is a significant refactoring of the sampling code that: - Moves all generic functions in nvfx_fragtex.c - Adds a driver-specific sampler view structure and uses it to precompute texture setup as it should be done - Unifies a bit more of code between nv30 and nv40 - Adds support for sampler view swizzles - Support for specifying as sampler view format different from the resource one (only trivially) - Support for sampler view specification of first and last level - Support for depth textures on nv30, both for reading depth and for compare - Support for sRGB textures - Unifies the format table between nv30 and nv40 - Expands the format table to include essentially all supportable formats except mixed sign and "autonormal" formats - Fixes the "is format supported" logic, which was quite broken, and makes it use the format table Only tested on nv30 currently. --- src/gallium/drivers/nouveau/nouveau_class.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/nouveau') diff --git a/src/gallium/drivers/nouveau/nouveau_class.h b/src/gallium/drivers/nouveau/nouveau_class.h index adfdd37b1b..685fa00b45 100644 --- a/src/gallium/drivers/nouveau/nouveau_class.h +++ b/src/gallium/drivers/nouveau/nouveau_class.h @@ -6328,6 +6328,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define NV34TCL_TX_FORMAT_FORMAT_R8G8B8_RECT 0x00001e00 #define NV34TCL_TX_FORMAT_FORMAT_A8L8_RECT 0x00002000 #define NV34TCL_TX_FORMAT_FORMAT_DSDT8 0x00002800 +#define NV34TCL_TX_FORMAT_FORMAT_Z24 0x2a00 +#define NV34TCL_TX_FORMAT_FORMAT_Z24_RECT 0x2b00 /* XXX: guess! */ +#define NV34TCL_TX_FORMAT_FORMAT_Z16 0x2c00 +#define NV34TCL_TX_FORMAT_FORMAT_Z16_RECT 0x2d00 /* XXX: guess! */ #define NV34TCL_TX_FORMAT_FORMAT_HILO16 0x00003300 #define NV34TCL_TX_FORMAT_FORMAT_HILO16_RECT 0x00003600 #define NV34TCL_TX_FORMAT_FORMAT_HILO8 0x00004400 -- cgit v1.2.3