[Mesa-dev] [PATCH 1/3] mesa: implement GL_ARB_texture_buffer_range
Brian Paul
brian.e.paul at gmail.com
Sun Dec 16 09:10:27 PST 2012
On Sun, Dec 16, 2012 at 9:50 AM, Christoph Bumiller
<e0425955 at student.tuwien.ac.at> wrote:
> ---
> src/mapi/glapi/gen/ARB_texture_buffer_range.xml | 22 ++++++
> src/mapi/glapi/gen/Makefile.am | 1 +
> src/mapi/glapi/gen/gl_API.xml | 2 +
> src/mesa/main/context.c | 1 +
> src/mesa/main/extensions.c | 1 +
> src/mesa/main/get.c | 1 +
> src/mesa/main/get_hash_params.py | 3 +
> src/mesa/main/mtypes.h | 6 ++
> src/mesa/main/teximage.c | 91 ++++++++++++++++++-----
> src/mesa/main/teximage.h | 4 +
> src/mesa/main/texparam.c | 8 ++
> 11 files changed, 121 insertions(+), 19 deletions(-)
> create mode 100644 src/mapi/glapi/gen/ARB_texture_buffer_range.xml
> + bufObj = _mesa_lookup_bufferobj(ctx, buffer);
> + if (bufObj) {
> + if (offset < 0 ||
> + size <= 0 ||
> + (offset + size) > bufObj->Size) {
> + _mesa_error(ctx, GL_INVALID_VALUE, "glTexBufferRange");
> + return;
> + }
> + if (offset % ctx->Const.TextureBufferOffsetAlignment) {
> + _mesa_error(ctx, GL_INVALID_VALUE, "glTexBufferRange(offset)");
Maybe say something like "invalid offset alignment" to give more info.
Looks OK to me otherwise.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list