summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_fragtex.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-02-20 18:37:43 +0100
committerYounes Manton <[email protected]>2010-03-15 00:03:01 -0400
commitb8e56d4cddbd9c491b940e3ce5974c526802c752 (patch)
tree6ae0a1030c6a43c6596393b787cea3d7b7e23352 /src/gallium/drivers/nv30/nv30_fragtex.c
parentd673c92810636dcc6de33d3618d494ce9f5717c1 (diff)
nv30, nv40: unify all structures and headers, except shaders
This patch unifies nv[34]0_screen.h, nv[34]0_context.h and nv[34]0_state.h The unified files are put in a new "nvfx" directory. nv30_context.h and nv40_context.h still exist to hold the function prototypes and include nvfx_context.h nv[34]0_screen.h and nv[34]0_state.h are deleted, replaced by the unified versions. nv40 includes some extra fields for swtnl and user clip planes support. These fields will be unused on nv30 until that functionality gets added to it too (by unification with nv40).
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_fragtex.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_fragtex.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gallium/drivers/nv30/nv30_fragtex.c b/src/gallium/drivers/nv30/nv30_fragtex.c
index 63b5015ed4a..34e7dd54445 100644
--- a/src/gallium/drivers/nv30/nv30_fragtex.c
+++ b/src/gallium/drivers/nv30/nv30_fragtex.c
@@ -58,10 +58,10 @@ nv30_fragtex_format(uint pipe_format)
static struct nouveau_stateobj *
-nv30_fragtex_build(struct nv30_context *nv30, int unit)
+nv30_fragtex_build(struct nvfx_context *nvfx, int unit)
{
- struct nv30_sampler_state *ps = nv30->tex_sampler[unit];
- struct nv30_miptree *nv30mt = nv30->tex_miptree[unit];
+ struct nvfx_sampler_state *ps = nvfx->tex_sampler[unit];
+ struct nvfx_miptree *nv30mt = nvfx->tex_miptree[unit];
struct pipe_texture *pt = &nv30mt->base;
struct nouveau_bo *bo = nouveau_bo(nv30mt->buffer);
struct nv30_texture_format *tf;
@@ -101,7 +101,7 @@ nv30_fragtex_build(struct nv30_context *nv30, int unit)
txs = tf->swizzle;
so = so_new(1, 8, 2);
- so_method(so, nv30->screen->eng3d, NV34TCL_TX_OFFSET(unit), 8);
+ so_method(so, nvfx->screen->eng3d, NV34TCL_TX_OFFSET(unit), 8);
so_reloc (so, bo, 0, tex_flags | NOUVEAU_BO_LOW, 0, 0);
so_reloc (so, bo, txf, tex_flags | NOUVEAU_BO_OR,
NV34TCL_TX_FORMAT_DMA0, NV34TCL_TX_FORMAT_DMA1);
@@ -117,10 +117,10 @@ nv30_fragtex_build(struct nv30_context *nv30, int unit)
}
static boolean
-nv30_fragtex_validate(struct nv30_context *nv30)
+nv30_fragtex_validate(struct nvfx_context *nvfx)
{
- struct nv30_fragment_program *fp = nv30->fragprog;
- struct nv30_state *state = &nv30->state;
+ struct nvfx_fragment_program *fp = nvfx->fragprog;
+ struct nvfx_state *state = &nvfx->state;
struct nouveau_stateobj *so;
unsigned samplers, unit;
@@ -130,32 +130,32 @@ nv30_fragtex_validate(struct nv30_context *nv30)
samplers &= ~(1 << unit);
so = so_new(1, 1, 0);
- so_method(so, nv30->screen->eng3d, NV34TCL_TX_ENABLE(unit), 1);
+ so_method(so, nvfx->screen->eng3d, NV34TCL_TX_ENABLE(unit), 1);
so_data (so, 0);
- so_ref(so, &nv30->state.hw[NV30_STATE_FRAGTEX0 + unit]);
+ so_ref(so, &nvfx->state.hw[NVFX_STATE_FRAGTEX0 + unit]);
so_ref(NULL, &so);
- state->dirty |= (1ULL << (NV30_STATE_FRAGTEX0 + unit));
+ state->dirty |= (1ULL << (NVFX_STATE_FRAGTEX0 + unit));
}
- samplers = nv30->dirty_samplers & fp->samplers;
+ samplers = nvfx->dirty_samplers & fp->samplers;
while (samplers) {
unit = ffs(samplers) - 1;
samplers &= ~(1 << unit);
- so = nv30_fragtex_build(nv30, unit);
- so_ref(so, &nv30->state.hw[NV30_STATE_FRAGTEX0 + unit]);
+ so = nv30_fragtex_build(nvfx, unit);
+ so_ref(so, &nvfx->state.hw[NVFX_STATE_FRAGTEX0 + unit]);
so_ref(NULL, &so);
- state->dirty |= (1ULL << (NV30_STATE_FRAGTEX0 + unit));
+ state->dirty |= (1ULL << (NVFX_STATE_FRAGTEX0 + unit));
}
- nv30->state.fp_samplers = fp->samplers;
+ nvfx->state.fp_samplers = fp->samplers;
return FALSE;
}
-struct nv30_state_entry nv30_state_fragtex = {
+struct nvfx_state_entry nv30_state_fragtex = {
.validate = nv30_fragtex_validate,
.dirty = {
- .pipe = NV30_NEW_SAMPLER | NV30_NEW_FRAGPROG,
+ .pipe = NVFX_NEW_SAMPLER | NVFX_NEW_FRAGPROG,
.hw = 0
}
};