summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2010-09-17 15:03:14 +0200
committerFrancisco Jerez <[email protected]>2010-09-21 02:43:11 +0200
commit72e5fd5c02cb745d95f11573e7119ad1ba4bc1a8 (patch)
tree49ce5306b69ae4565d7dbd7adb3f13a188e6c00f /src
parentd21301675c249602e19310d5b62fad424f2f2ac2 (diff)
dri/nv04: Use nvgl_wrap_mode().
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_tex.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index 4ac8327b871..b720089fbf0 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -55,24 +55,6 @@ get_tex_format(struct gl_texture_image *ti)
}
}
-static inline unsigned
-get_wrap_mode(unsigned wrap)
-{
- switch (wrap) {
- case GL_REPEAT:
- return 0x1;
- case GL_MIRRORED_REPEAT:
- return 0x2;
- case GL_CLAMP:
- case GL_CLAMP_TO_EDGE:
- return 0x3;
- case GL_CLAMP_TO_BORDER:
- return 0x4;
- default:
- assert(0);
- }
-}
-
void
nv04_emit_tex_obj(GLcontext *ctx, int emit)
{
@@ -106,8 +88,8 @@ nv04_emit_tex_obj(GLcontext *ctx, int emit)
t->LodBias, -16, 15) * 8;
}
- format |= get_wrap_mode(t->WrapT) << 28 |
- get_wrap_mode(t->WrapS) << 24 |
+ format |= nvgl_wrap_mode(t->WrapT) << 28 |
+ nvgl_wrap_mode(t->WrapS) << 24 |
ti->HeightLog2 << 20 |
ti->WidthLog2 << 16 |
lod_max << 12 |