diff options
author | marha <marha@users.sourceforge.net> | 2012-01-25 08:24:51 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-25 08:24:51 +0100 |
commit | e6432710d8a586386b3c7025e845cf4f80830da3 (patch) | |
tree | a403fa86779a287c97f5605f9b4d455d662ece66 /mesalib/src/mesa/swrast/s_texture.c | |
parent | d3f0fe49b8cb29295f3e529cc699a2abde1515a1 (diff) | |
download | vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.tar.gz vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.tar.bz2 vcxsrv-e6432710d8a586386b3c7025e845cf4f80830da3.zip |
mesa git update 25 jan 2012
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texture.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_texture.c | 57 |
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. */ |