summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-03-04 14:34:27 -0800
committerLaura Ekstrand <[email protected]>2015-03-09 13:33:54 -0700
commit0f6372946b8bf52658140508d6501fe1bfd180d0 (patch)
treefd512e1755aa31ef28e9a8a79398810cdbf27007 /src/mesa/main/teximage.c
parent6b78a1fb89670fd050747c79a20ecb1b2cd2dc2e (diff)
main: Cosmetic changes for Texture Buffers.
Adds a useful comment and some whitespace. Fixes an error message. v2: Review from Anuj Phogat - Split rebase of Tex[ture]Buffer[Range] Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 706c76b046c..b4b5ac56c0c 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -5354,6 +5354,14 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
buffer);
return;
} else {
+
+ /* OpenGL 4.5 core spec (02.02.2015) says in Section 8.9 Buffer
+ * Textures (PDF page 254):
+ * "If buffer is zero, then any buffer object attached to the buffer
+ * texture is detached, the values offset and size are ignored and
+ * the state for offset and size for the buffer texture are reset to
+ * zero."
+ */
offset = 0;
size = 0;
}
@@ -5382,8 +5390,7 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
bufObj = NULL;
/* Get the texture object by Name. */
- texObj = _mesa_lookup_texture_err(ctx, texture,
- "glTextureBuffer(texture)");
+ texObj = _mesa_lookup_texture_err(ctx, texture, "glTextureBuffer");
if (!texObj)
return;