mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mesa: Update comments/assertions about buffer mapping for glGetTexImage().
This code is about to stop needing ->Data and using MapTextureImage(). Tested-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
8df7ca7112
commit
177110ae32
1 changed files with 3 additions and 4 deletions
|
|
@ -409,7 +409,8 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixel
|
|||
/**
|
||||
* This is the software fallback for Driver.GetTexImage().
|
||||
* All error checking will have been done before this routine is called.
|
||||
* The texture image must be mapped.
|
||||
* We'll call ctx->Driver.MapTextureImage() to access the data, then
|
||||
* unmap with ctx->Driver.UnmapTextureImage().
|
||||
*/
|
||||
void
|
||||
_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
|
|
@ -419,9 +420,6 @@ _mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
|||
{
|
||||
GLuint dimensions;
|
||||
|
||||
/* If we get here, the texture image should be mapped */
|
||||
assert(texImage->Data);
|
||||
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
dimensions = 1;
|
||||
|
|
@ -433,6 +431,7 @@ _mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
|||
dimensions = 2;
|
||||
}
|
||||
|
||||
/* map dest buffer, if PBO */
|
||||
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
|
||||
/* Packing texture image into a PBO.
|
||||
* Map the (potentially) VRAM-based buffer into our process space so
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue