summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40/nv40_fragtex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_fragtex.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_fragtex.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/drivers/nv40/nv40_fragtex.c b/src/gallium/drivers/nv40/nv40_fragtex.c
index 4c26f3cb12..0b46a5313b 100644
--- a/src/gallium/drivers/nv40/nv40_fragtex.c
+++ b/src/gallium/drivers/nv40/nv40_fragtex.c
@@ -61,10 +61,10 @@ nv40_fragtex_format(uint pipe_format)
static struct nouveau_stateobj *
-nv40_fragtex_build(struct nv40_context *nv40, int unit)
+nv40_fragtex_build(struct nvfx_context *nvfx, int unit)
{
- struct nv40_sampler_state *ps = nv40->tex_sampler[unit];
- struct nv40_miptree *nv40mt = nv40->tex_miptree[unit];
+ struct nvfx_sampler_state *ps = nvfx->tex_sampler[unit];
+ struct nvfx_miptree *nv40mt = nvfx->tex_miptree[unit];
struct nouveau_bo *bo = nouveau_bo(nv40mt->buffer);
struct pipe_texture *pt = &nv40mt->base;
struct nv40_texture_format *tf;
@@ -111,7 +111,7 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
txs = tf->swizzle;
so = so_new(2, 9, 2);
- so_method(so, nv40->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);
@@ -122,17 +122,17 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
so_data (so, (pt->width0 << NV34TCL_TX_NPOT_SIZE_W_SHIFT) |
pt->height0);
so_data (so, ps->bcol);
- so_method(so, nv40->screen->eng3d, NV40TCL_TEX_SIZE1(unit), 1);
+ so_method(so, nvfx->screen->eng3d, NV40TCL_TEX_SIZE1(unit), 1);
so_data (so, (pt->depth0 << NV40TCL_TEX_SIZE1_DEPTH_SHIFT) | txp);
return so;
}
static boolean
-nv40_fragtex_validate(struct nv40_context *nv40)
+nv40_fragtex_validate(struct nvfx_context *nvfx)
{
- struct nv40_fragment_program *fp = nv40->fragprog;
- struct nv40_state *state = &nv40->state;
+ struct nvfx_fragment_program *fp = nvfx->fragprog;
+ struct nvfx_state *state = &nvfx->state;
struct nouveau_stateobj *so;
unsigned samplers, unit;
@@ -142,31 +142,31 @@ nv40_fragtex_validate(struct nv40_context *nv40)
samplers &= ~(1 << unit);
so = so_new(1, 1, 0);
- so_method(so, nv40->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, &nv40->state.hw[NV40_STATE_FRAGTEX0 + unit]);
- state->dirty |= (1ULL << (NV40_STATE_FRAGTEX0 + unit));
+ so_ref(so, &nvfx->state.hw[NVFX_STATE_FRAGTEX0 + unit]);
+ state->dirty |= (1ULL << (NVFX_STATE_FRAGTEX0 + unit));
}
- samplers = nv40->dirty_samplers & fp->samplers;
+ samplers = nvfx->dirty_samplers & fp->samplers;
while (samplers) {
unit = ffs(samplers) - 1;
samplers &= ~(1 << unit);
- so = nv40_fragtex_build(nv40, unit);
- so_ref(so, &nv40->state.hw[NV40_STATE_FRAGTEX0 + unit]);
+ so = nv40_fragtex_build(nvfx, unit);
+ so_ref(so, &nvfx->state.hw[NVFX_STATE_FRAGTEX0 + unit]);
so_ref(NULL, &so);
- state->dirty |= (1ULL << (NV40_STATE_FRAGTEX0 + unit));
+ state->dirty |= (1ULL << (NVFX_STATE_FRAGTEX0 + unit));
}
- nv40->state.fp_samplers = fp->samplers;
+ nvfx->state.fp_samplers = fp->samplers;
return FALSE;
}
-struct nv40_state_entry nv40_state_fragtex = {
+struct nvfx_state_entry nv40_state_fragtex = {
.validate = nv40_fragtex_validate,
.dirty = {
- .pipe = NV40_NEW_SAMPLER | NV40_NEW_FRAGPROG,
+ .pipe = NVFX_NEW_SAMPLER | NVFX_NEW_FRAGPROG,
.hw = 0
}
};