diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-08-07 03:47:25 +0200 |
---|---|---|
committer | Luca Barbieri <luca@luca-barbieri.com> | 2010-08-21 20:42:14 +0200 |
commit | 73b7c6fb336ad3e717f8e961f4e2df761e94cd2f (patch) | |
tree | 32c08325837d6441c1b6a33ce0fea1d386312c85 /src/gallium/drivers/nvfx/nvfx_context.h | |
parent | 4e2080a86e0cbb93c72bbf4acace53867fac8276 (diff) |
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.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_context.h')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_context.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h index a6ea913967..bce19df044 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.h +++ b/src/gallium/drivers/nvfx/nvfx_context.h @@ -201,15 +201,20 @@ extern void nvfx_fragprog_relocate(struct nvfx_context *nvfx); /* nvfx_fragtex.c */ +extern void nvfx_init_sampling_functions(struct nvfx_context *nvfx); extern void nvfx_fragtex_validate(struct nvfx_context *nvfx); -extern void -nvfx_fragtex_relocate(struct nvfx_context *nvfx); +extern void nvfx_fragtex_relocate(struct nvfx_context *nvfx); + +struct nvfx_sampler_view; /* nv30_fragtex.c */ extern void nv30_sampler_state_init(struct pipe_context *pipe, struct nvfx_sampler_state *ps, const struct pipe_sampler_state *cso); +extern void +nv30_sampler_view_init(struct pipe_context *pipe, + struct nvfx_sampler_view *sv); extern void nv30_fragtex_set(struct nvfx_context *nvfx, int unit); /* nv40_fragtex.c */ @@ -217,6 +222,9 @@ extern void nv40_sampler_state_init(struct pipe_context *pipe, struct nvfx_sampler_state *ps, const struct pipe_sampler_state *cso); +extern void +nv40_sampler_view_init(struct pipe_context *pipe, + struct nvfx_sampler_view *sv); extern void nv40_fragtex_set(struct nvfx_context *nvfx, int unit); /* nvfx_state.c */ |