summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nv40/nv40_state_tex.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-11-21 19:20:38 +1100
committerBen Skeggs <skeggsb@gmail.com>2007-11-21 19:20:38 +1100
commitff7edad0776603aa62b8f684db20c84bde75ea0b (patch)
treeaec9ae47780ab491c4778c3ad4d902e1ec97de6e /src/mesa/pipe/nv40/nv40_state_tex.c
parentaf1a38893946cf2fabd0fc6956efd07ef15b954b (diff)
nv40: Better teximage layout, probably not 100% correct still.
Gallium represents image layout by saying that each mipmap level has a number of "face" images within it. However, nv40 represents them as "faces" that have a number of mipmap levels. I'm not sure if the gallium representation allows this, but I've made an attempt to match it as closely as possible. CUBE/3D textures with mipmaps are probably broken, but untested currently.
Diffstat (limited to 'src/mesa/pipe/nv40/nv40_state_tex.c')
-rw-r--r--src/mesa/pipe/nv40/nv40_state_tex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/pipe/nv40/nv40_state_tex.c b/src/mesa/pipe/nv40/nv40_state_tex.c
index cf2a7a9fe0..bd779df9b3 100644
--- a/src/mesa/pipe/nv40/nv40_state_tex.c
+++ b/src/mesa/pipe/nv40/nv40_state_tex.c
@@ -75,8 +75,10 @@ nv40_tex_unit_enable(struct nv40_context *nv40, int unit)
txf |= NV40TCL_TEX_FORMAT_NO_BORDER;
switch (mt->target) {
- case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_CUBE:
+ txf |= NV40TCL_TEX_FORMAT_CUBIC;
+ /* fall-through */
+ case PIPE_TEXTURE_2D:
txf |= NV40TCL_TEX_FORMAT_DIMS_2D;
break;
case PIPE_TEXTURE_3D: