summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2007-05-11 21:40:00 +0000
committerOliver McFadden <[email protected]>2007-05-11 21:41:16 +0000
commit3f709f16ef1feb7c5e6f67c1deef56d97695a86d (patch)
treee9fbaa4643d29f777621fc3b1ed3b5a48968b555 /src/mesa
parent67363327e59a2f4699802b1a26c232ad092c1c6e (diff)
r300: Enable hardware 3D texture support. Fixes the stex3d demo.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c14
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c10
2 files changed, 2 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index d78e3dfb23e..a8be0f6ff74 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -876,7 +876,6 @@ static void r300CompressedTexSubImage2D(GLcontext * ctx, GLenum target,
t->dirty_images[face] |= (1 << level);
}
-#if ENABLE_HW_3D_TEXTURE
static void r300TexImage3D(GLcontext * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
@@ -930,9 +929,7 @@ static void r300TexImage3D(GLcontext * ctx, GLenum target, GLint level,
t->dirty_images[0] |= (1 << level);
}
}
-#endif
-#if ENABLE_HW_3D_TEXTURE
static void
r300TexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
@@ -966,7 +963,6 @@ r300TexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
t->dirty_images[0] |= (1 << level);
}
-#endif
static void r300TexEnv(GLcontext * ctx, GLenum target,
GLenum pname, const GLfloat * param)
@@ -1087,9 +1083,7 @@ static void r300BindTexture(GLcontext * ctx, GLenum target,
if ((target == GL_TEXTURE_1D)
|| (target == GL_TEXTURE_2D)
-#if ENABLE_HW_3D_TEXTURE
|| (target == GL_TEXTURE_3D)
-#endif
|| (target == GL_TEXTURE_CUBE_MAP)
|| (target == GL_TEXTURE_RECTANGLE_NV)) {
assert(texObj->DriverData != NULL);
@@ -1150,18 +1144,10 @@ void r300InitTextureFuncs(struct dd_function_table *functions)
functions->ChooseTextureFormat = r300ChooseTextureFormat;
functions->TexImage1D = r300TexImage1D;
functions->TexImage2D = r300TexImage2D;
-#if ENABLE_HW_3D_TEXTURE
functions->TexImage3D = r300TexImage3D;
-#else
- functions->TexImage3D = _mesa_store_teximage3d;
-#endif
functions->TexSubImage1D = r300TexSubImage1D;
functions->TexSubImage2D = r300TexSubImage2D;
-#if ENABLE_HW_3D_TEXTURE
functions->TexSubImage3D = r300TexSubImage3D;
-#else
- functions->TexSubImage3D = _mesa_store_texsubimage3d;
-#endif
functions->NewTextureObject = r300NewTextureObject;
functions->BindTexture = r300BindTexture;
functions->DeleteTexture = r300DeleteTexture;
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index bef597e4dc0..8b36bd8bb2b 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -420,7 +420,6 @@ static GLboolean enable_tex_2d(GLcontext * ctx, int unit)
return GL_TRUE;
}
-#if ENABLE_HW_3D_TEXTURE
static GLboolean enable_tex_3d(GLcontext * ctx, int unit)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -445,7 +444,6 @@ static GLboolean enable_tex_3d(GLcontext * ctx, int unit)
return GL_TRUE;
}
-#endif
static GLboolean enable_tex_cube(GLcontext * ctx, int unit)
{
@@ -546,14 +544,10 @@ static GLboolean r300UpdateTextureUnit(GLcontext * ctx, int unit)
} else if (texUnit->_ReallyEnabled & (TEXTURE_1D_BIT | TEXTURE_2D_BIT)) {
return (enable_tex_2d(ctx, unit) &&
update_tex_common(ctx, unit));
- }
-#if ENABLE_HW_3D_TEXTURE
- else if (texUnit->_ReallyEnabled & (TEXTURE_3D_BIT)) {
+ } else if (texUnit->_ReallyEnabled & (TEXTURE_3D_BIT)) {
return (enable_tex_3d(ctx, unit) &&
update_tex_common(ctx, unit));
- }
-#endif
- else if (texUnit->_ReallyEnabled & (TEXTURE_CUBE_BIT)) {
+ } else if (texUnit->_ReallyEnabled & (TEXTURE_CUBE_BIT)) {
return (enable_tex_cube(ctx, unit) &&
update_tex_common(ctx, unit));
} else if (texUnit->_ReallyEnabled) {