aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texture.c')
-rw-r--r--mesalib/src/mesa/swrast/s_texture.c57
1 files changed, 2 insertions, 55 deletions
diff --git a/mesalib/src/mesa/swrast/s_texture.c b/mesalib/src/mesa/swrast/s_texture.c
index 337a52f32..72d309300 100644
--- a/mesalib/src/mesa/swrast/s_texture.c
+++ b/mesalib/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;
}
}
}
@@ -316,59 +316,6 @@ _swrast_unmap_textures(struct gl_context *ctx)
/**
- * Map or unmap any textures that we may be rendering to as renderbuffers.
- */
-static void
-map_unmap_renderbuffers(struct gl_context *ctx,
- struct gl_framebuffer *fb,
- GLboolean map)
-{
- GLuint i;
-
- for (i = 0; i < Elements(fb->Attachment); i++) {
- struct gl_texture_object *texObj = fb->Attachment[i].Texture;
- if (texObj) {
- const GLuint level = fb->Attachment[i].TextureLevel;
- const GLuint face = fb->Attachment[i].CubeMapFace;
- struct gl_texture_image *texImage = texObj->Image[face][level];
- if (texImage) {
- struct swrast_texture_image *swImage
- = swrast_texture_image(texImage);
-
- if (map) {
- /* XXX we'll eventually call _swrast_map_teximage() here */
- swImage->Data = swImage->Buffer;
- }
- else {
- /* XXX we'll eventually call _swrast_unmap_teximage() here */
- swImage->Data = NULL;
- }
- }
- }
- }
-}
-
-
-void
-_swrast_map_renderbuffers(struct gl_context *ctx)
-{
- map_unmap_renderbuffers(ctx, ctx->DrawBuffer, GL_TRUE);
- if (ctx->ReadBuffer != ctx->DrawBuffer)
- map_unmap_renderbuffers(ctx, ctx->ReadBuffer, GL_TRUE);
-}
-
-
-void
-_swrast_unmap_renderbuffers(struct gl_context *ctx)
-{
- map_unmap_renderbuffers(ctx, ctx->DrawBuffer, GL_FALSE);
- if (ctx->ReadBuffer != ctx->DrawBuffer)
- map_unmap_renderbuffers(ctx, ctx->ReadBuffer, GL_FALSE);
-}
-
-
-
-/**
* Called via ctx->Driver.AllocTextureStorage()
* Just have to allocate memory for the texture images.
*/