diff options
author | Brian Paul <[email protected]> | 2012-01-16 10:54:41 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-24 14:12:10 -0700 |
commit | bd3c10c0f0c60ab3421c2da2eab814edc2296cb0 (patch) | |
tree | 936f9ce4cafba10935227e75169bc6b7a8675cfc /src/mesa/swrast | |
parent | ecb8594c184f5daa2f5a735e42ee24e7d110aa9f (diff) |
swrast: s/Data/Map/ in swrast_texture_image
To indicate that it points to mapped texture memory.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_context.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_texfetch_tmp.h | 6 | ||||
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_texture.c | 8 | ||||
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 0a383aa3bff..3391600e120 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -142,7 +142,7 @@ struct swrast_texture_image GLint RowStride; /**< Padded width in units of texels */ GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to each 2D slice in 'Data', in texels */ - GLubyte *Data; /**< Image data, accessed via FetchTexel() */ + GLubyte *Map; /**< Pointer to mapped image memory */ /** Malloc'd texture memory */ GLubyte *Buffer; diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h index 877c29c9b74..f1a2ed699ea 100644 --- a/src/mesa/swrast/s_texfetch_tmp.h +++ b/src/mesa/swrast/s_texfetch_tmp.h @@ -43,7 +43,7 @@ #if DIM == 1 #define TEXEL_ADDR( type, image, i, j, k, size ) \ - ((void) (j), (void) (k), ((type *)(image)->Data + (i) * (size))) + ((void) (j), (void) (k), ((type *)(image)->Map + (i) * (size))) #define FETCH(x) fetch_texel_1d_##x @@ -51,14 +51,14 @@ #define TEXEL_ADDR( type, image, i, j, k, size ) \ ((void) (k), \ - ((type *)(image)->Data + ((image)->RowStride * (j) + (i)) * (size))) + ((type *)(image)->Map + ((image)->RowStride * (j) + (i)) * (size))) #define FETCH(x) fetch_texel_2d_##x #elif DIM == 3 #define TEXEL_ADDR( type, image, i, j, k, size ) \ - ((type *)(image)->Data + ((image)->ImageOffsets[k] \ + ((type *)(image)->Map + ((image)->ImageOffsets[k] \ + (image)->RowStride * (j) + (i)) * (size)) #define FETCH(x) fetch_texel_3d_##x diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 21b55a8017e..d142d3d0762 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1380,7 +1380,7 @@ opt_sample_rgb_2d(struct gl_context *ctx, GLint i = IFLOOR(texcoords[k][0] * width) & colMask; GLint j = IFLOOR(texcoords[k][1] * height) & rowMask; GLint pos = (j << shift) | i; - GLubyte *texel = swImg->Data + 3 * pos; + GLubyte *texel = swImg->Map + 3 * pos; rgba[k][RCOMP] = UBYTE_TO_FLOAT(texel[2]); rgba[k][GCOMP] = UBYTE_TO_FLOAT(texel[1]); rgba[k][BCOMP] = UBYTE_TO_FLOAT(texel[0]); @@ -1424,7 +1424,7 @@ opt_sample_rgba_2d(struct gl_context *ctx, const GLint col = IFLOOR(texcoords[i][0] * width) & colMask; const GLint row = IFLOOR(texcoords[i][1] * height) & rowMask; const GLint pos = (row << shift) | col; - const GLuint texel = *((GLuint *) swImg->Data + pos); + const GLuint texel = *((GLuint *) swImg->Map + pos); rgba[i][RCOMP] = UBYTE_TO_FLOAT( (texel >> 24) ); rgba[i][GCOMP] = UBYTE_TO_FLOAT( (texel >> 16) & 0xff ); rgba[i][BCOMP] = UBYTE_TO_FLOAT( (texel >> 8) & 0xff ); diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 337a52f32a0..a50018dfd4b 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -247,7 +247,7 @@ _swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj) swrast_texture_image(texImage); /* XXX we'll eventually call _swrast_map_teximage() here */ - swImage->Data = swImage->Buffer; + swImage->Map = swImage->Buffer; } } } @@ -268,7 +268,7 @@ _swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj) = swrast_texture_image(texImage); /* XXX we'll eventually call _swrast_unmap_teximage() here */ - swImage->Data = NULL; + swImage->Map = NULL; } } } @@ -337,11 +337,11 @@ map_unmap_renderbuffers(struct gl_context *ctx, if (map) { /* XXX we'll eventually call _swrast_map_teximage() here */ - swImage->Data = swImage->Buffer; + swImage->Map = swImage->Buffer; } else { /* XXX we'll eventually call _swrast_unmap_teximage() here */ - swImage->Data = NULL; + swImage->Map = NULL; } } } diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 43deaf47b96..4d815c5d675 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -132,7 +132,7 @@ _swrast_culltriangle( struct gl_context *ctx, const GLfloat twidth = (GLfloat) texImg->Width; \ const GLfloat theight = (GLfloat) texImg->Height; \ const GLint twidth_log2 = texImg->WidthLog2; \ - const GLubyte *texture = (const GLubyte *) swImg->Data; \ + const GLubyte *texture = (const GLubyte *) swImg->Map; \ const GLint smask = texImg->Width - 1; \ const GLint tmask = texImg->Height - 1; \ ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \ @@ -189,7 +189,7 @@ _swrast_culltriangle( struct gl_context *ctx, const GLfloat twidth = (GLfloat) texImg->Width; \ const GLfloat theight = (GLfloat) texImg->Height; \ const GLint twidth_log2 = texImg->WidthLog2; \ - const GLubyte *texture = (const GLubyte *) swImg->Data; \ + const GLubyte *texture = (const GLubyte *) swImg->Map; \ const GLint smask = texImg->Width - 1; \ const GLint tmask = texImg->Height - 1; \ ASSERT(texImg->TexFormat == MESA_FORMAT_RGB888); \ @@ -543,7 +543,7 @@ affine_span(struct gl_context *ctx, SWspan *span, swrast_texture_image_const(texImg); \ const GLfloat twidth = (GLfloat) texImg->Width; \ const GLfloat theight = (GLfloat) texImg->Height; \ - info.texture = (const GLchan *) swImg->Data; \ + info.texture = (const GLchan *) swImg->Map; \ info.twidth_log2 = texImg->WidthLog2; \ info.smask = texImg->Width - 1; \ info.tmask = texImg->Height - 1; \ @@ -810,7 +810,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span, obj->Image[0][obj->BaseLevel]; \ const struct swrast_texture_image *swImg = \ swrast_texture_image_const(texImg); \ - info.texture = (const GLchan *) swImg->Data; \ + info.texture = (const GLchan *) swImg->Map; \ info.twidth_log2 = texImg->WidthLog2; \ info.smask = texImg->Width - 1; \ info.tmask = texImg->Height - 1; \ |