summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-10-05 01:48:07 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-10-05 01:48:07 +0000
commita9fc8ba756dd25a07dc19058fe60f65bda82a055 (patch)
treeaa863fa82d93ea468d6c16e3db6fa74ad1ffb5cb /src/mesa/swrast
parent91802fdf730451aaa0246f514f6778ffaef92c50 (diff)
In gl_texture_image replace IntFormat with InternalFormat and Format with
_BaseFormat to be consistant with gl_renderbuffer.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_texcombine.c2
-rw-r--r--src/mesa/swrast/s_texfilter.c20
-rw-r--r--src/mesa/swrast/s_texstore.c12
-rw-r--r--src/mesa/swrast/s_triangle.c4
4 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 0f662c3d2b..3c9fdc4d75 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -743,7 +743,7 @@ texture_apply( const GLcontext *ctx,
baseLevel = texUnit->_Current->BaseLevel;
ASSERT(texUnit->_Current->Image[0][baseLevel]);
- format = texUnit->_Current->Image[0][baseLevel]->Format;
+ format = texUnit->_Current->Image[0][baseLevel]->_BaseFormat;
if (format == GL_COLOR_INDEX || format == GL_YCBCR_MESA) {
format = GL_RGBA; /* a bit of a hack */
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 05618a1f80..f6e14a4d97 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1041,7 +1041,7 @@ sample_2d_linear_repeat(GLcontext *ctx,
ASSERT(tObj->WrapS == GL_REPEAT);
ASSERT(tObj->WrapT == GL_REPEAT);
ASSERT(img->Border == 0);
- ASSERT(img->Format != GL_COLOR_INDEX);
+ ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
ASSERT(img->_IsPowerOfTwo);
COMPUTE_LINEAR_REPEAT_TEXEL_LOCATION(texcoord[0], u, width, i0, i1);
@@ -1234,7 +1234,7 @@ opt_sample_rgb_2d( GLcontext *ctx,
ASSERT(tObj->WrapS==GL_REPEAT);
ASSERT(tObj->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->Format==GL_RGB);
+ ASSERT(img->_BaseFormat==GL_RGB);
ASSERT(img->_IsPowerOfTwo);
for (k=0; k<n; k++) {
@@ -1275,7 +1275,7 @@ opt_sample_rgba_2d( GLcontext *ctx,
ASSERT(tObj->WrapS==GL_REPEAT);
ASSERT(tObj->WrapT==GL_REPEAT);
ASSERT(img->Border==0);
- ASSERT(img->Format==GL_RGBA);
+ ASSERT(img->_BaseFormat==GL_RGBA);
ASSERT(img->_IsPowerOfTwo);
for (i = 0; i < n; i++) {
@@ -1305,7 +1305,7 @@ sample_lambda_2d( GLcontext *ctx,
const GLboolean repeatNoBorderPOT = (tObj->WrapS == GL_REPEAT)
&& (tObj->WrapT == GL_REPEAT)
&& (tImg->Border == 0 && (tImg->Width == tImg->RowStride))
- && (tImg->Format != GL_COLOR_INDEX)
+ && (tImg->_BaseFormat != GL_COLOR_INDEX)
&& tImg->_IsPowerOfTwo;
ASSERT(lambda != NULL);
@@ -2045,7 +2045,7 @@ sample_nearest_rect(GLcontext *ctx,
ASSERT(tObj->WrapT == GL_CLAMP ||
tObj->WrapT == GL_CLAMP_TO_EDGE ||
tObj->WrapT == GL_CLAMP_TO_BORDER);
- ASSERT(img->Format != GL_COLOR_INDEX);
+ ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
/* XXX move Wrap mode tests outside of loops for common cases */
for (i = 0; i < n; i++) {
@@ -2100,7 +2100,7 @@ sample_linear_rect(GLcontext *ctx,
ASSERT(tObj->WrapT == GL_CLAMP ||
tObj->WrapT == GL_CLAMP_TO_EDGE ||
tObj->WrapT == GL_CLAMP_TO_BORDER);
- ASSERT(img->Format != GL_COLOR_INDEX);
+ ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
/* XXX lots of opportunity for optimization in this loop */
for (i = 0; i < n; i++) {
@@ -2248,8 +2248,8 @@ sample_depth_texture( GLcontext *ctx,
(void) lambda;
- ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT ||
- tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_STENCIL_EXT);
+ ASSERT(tObj->Image[0][tObj->BaseLevel]->_BaseFormat == GL_DEPTH_COMPONENT ||
+ tObj->Image[0][tObj->BaseLevel]->_BaseFormat == GL_DEPTH_STENCIL_EXT);
ASSERT(tObj->Target == GL_TEXTURE_1D ||
tObj->Target == GL_TEXTURE_2D ||
@@ -2544,7 +2544,7 @@ sample_depth_texture2(const GLcontext *ctx,
* GL_TEXTURE_COMPARE_SGIX == GL_TRUE but the current texture object
* isn't a depth texture.
*/
- if (texImage->Format != GL_DEPTH_COMPONENT) {
+ if (texImage->_BaseFormat != GL_DEPTH_COMPONENT) {
_mesa_problem(ctx,"GL_TEXTURE_COMPARE_SGIX enabled with non-depth texture");
return;
}
@@ -2647,7 +2647,7 @@ _swrast_choose_texture_sample_func( GLcontext *ctx,
}
else {
const GLboolean needLambda = (GLboolean) (t->MinFilter != t->MagFilter);
- const GLenum format = t->Image[0][t->BaseLevel]->Format;
+ const GLenum format = t->Image[0][t->BaseLevel]->_BaseFormat;
switch (t->Target) {
case GL_TEXTURE_1D:
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c
index c0da83eb9f..ff1f9d9992 100644
--- a/src/mesa/swrast/s_texstore.c
+++ b/src/mesa/swrast/s_texstore.c
@@ -394,7 +394,7 @@ _swrast_copy_texsubimage1d( GLcontext *ctx, GLenum target, GLint level,
ASSERT(ctx->Driver.TexImage1D);
- if (texImage->Format == GL_DEPTH_COMPONENT) {
+ if (texImage->_BaseFormat == GL_DEPTH_COMPONENT) {
/* read depth image from framebuffer */
GLfloat *image = read_depth_image(ctx, x, y, width, 1);
if (!image) {
@@ -408,7 +408,7 @@ _swrast_copy_texsubimage1d( GLcontext *ctx, GLenum target, GLint level,
&ctx->DefaultPacking, texObj, texImage);
_mesa_free(image);
}
- else if (texImage->Format == GL_DEPTH_STENCIL_EXT) {
+ else if (texImage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
/* read depth/stencil image from framebuffer */
GLuint *image = read_depth_stencil_image(ctx, x, y, width, 1);
if (!image) {
@@ -463,7 +463,7 @@ _swrast_copy_texsubimage2d( GLcontext *ctx,
ASSERT(ctx->Driver.TexImage2D);
- if (texImage->Format == GL_DEPTH_COMPONENT) {
+ if (texImage->_BaseFormat == GL_DEPTH_COMPONENT) {
/* read depth image from framebuffer */
GLfloat *image = read_depth_image(ctx, x, y, width, height);
if (!image) {
@@ -477,7 +477,7 @@ _swrast_copy_texsubimage2d( GLcontext *ctx,
&ctx->DefaultPacking, texObj, texImage);
_mesa_free(image);
}
- else if (texImage->Format == GL_DEPTH_STENCIL_EXT) {
+ else if (texImage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
/* read depth/stencil image from framebuffer */
GLuint *image = read_depth_stencil_image(ctx, x, y, width, height);
if (!image) {
@@ -534,7 +534,7 @@ _swrast_copy_texsubimage3d( GLcontext *ctx,
ASSERT(ctx->Driver.TexImage3D);
- if (texImage->Format == GL_DEPTH_COMPONENT) {
+ if (texImage->_BaseFormat == GL_DEPTH_COMPONENT) {
/* read depth image from framebuffer */
GLfloat *image = read_depth_image(ctx, x, y, width, height);
if (!image) {
@@ -548,7 +548,7 @@ _swrast_copy_texsubimage3d( GLcontext *ctx,
&ctx->DefaultPacking, texObj, texImage);
_mesa_free(image);
}
- else if (texImage->Format == GL_DEPTH_STENCIL_EXT) {
+ else if (texImage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
/* read depth/stencil image from framebuffer */
GLuint *image = read_depth_stencil_image(ctx, x, y, width, height);
if (!image) {
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 6ed405f053..42acdc8ff6 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -544,7 +544,7 @@ affine_span(GLcontext *ctx, struct sw_span *span,
info.twidth_log2 = obj->Image[0][b]->WidthLog2; \
info.smask = obj->Image[0][b]->Width - 1; \
info.tmask = obj->Image[0][b]->Height - 1; \
- info.format = obj->Image[0][b]->Format; \
+ info.format = obj->Image[0][b]->_BaseFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
span.arrayMask |= SPAN_RGBA; \
@@ -814,7 +814,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span,
info.twidth_log2 = obj->Image[0][b]->WidthLog2; \
info.smask = obj->Image[0][b]->Width - 1; \
info.tmask = obj->Image[0][b]->Height - 1; \
- info.format = obj->Image[0][b]->Format; \
+ info.format = obj->Image[0][b]->_BaseFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
\