Mesa (master): mesa: Add MESA_VERBOSE= api for several indexed BindBuffer variants
Jordan Justen
jljusten at kemper.freedesktop.org
Fri Jan 1 20:05:14 UTC 2016
Module: Mesa
Branch: master
Commit: 36db91c4c44e8546d80d3ca246853c738086625d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36db91c4c44e8546d80d3ca246853c738086625d
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Tue Dec 29 14:24:09 2015 -0800
mesa: Add MESA_VERBOSE=api for several indexed BindBuffer variants
v2:
* Add braces '{}' when the _mesa_debug call spans multiple lines (Ken)
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/mesa/main/bufferobj.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e0639c8..181eb49 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1205,9 +1205,10 @@ _mesa_BindBuffer(GLenum target, GLuint buffer)
{
GET_CURRENT_CONTEXT(ctx);
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API) {
_mesa_debug(ctx, "glBindBuffer(%s, %u)\n",
_mesa_enum_to_string(target), buffer);
+ }
bind_buffer_object(ctx, target, buffer);
}
@@ -1562,12 +1563,13 @@ _mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
{
bool valid_usage;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API) {
_mesa_debug(ctx, "%s(%s, %ld, %p, %s)\n",
func,
_mesa_enum_to_string(target),
(long int) size, data,
_mesa_enum_to_string(usage));
+ }
if (size < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(size < 0)", func);
@@ -3911,6 +3913,11 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
+ if (MESA_VERBOSE & VERBOSE_API) {
+ _mesa_debug(ctx, "glBindBufferRange(%s, %u, %u, %d, %d)\n",
+ _mesa_enum_to_string(target), index, buffer, offset, size);
+ }
+
if (buffer == 0) {
bufObj = ctx->Shared->NullBufferObj;
} else {
@@ -3963,6 +3970,11 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
+ if (MESA_VERBOSE & VERBOSE_API) {
+ _mesa_debug(ctx, "glBindBufferBase(%s, %u, %u)\n",
+ _mesa_enum_to_string(target), index, buffer);
+ }
+
if (buffer == 0) {
bufObj = ctx->Shared->NullBufferObj;
} else {
@@ -4033,6 +4045,12 @@ _mesa_BindBuffersRange(GLenum target, GLuint first, GLsizei count,
{
GET_CURRENT_CONTEXT(ctx);
+ if (MESA_VERBOSE & VERBOSE_API) {
+ _mesa_debug(ctx, "glBindBuffersRange(%s, %u, %d, %p, %p, %p)\n",
+ _mesa_enum_to_string(target), first, count,
+ buffers, offsets, sizes);
+ }
+
switch (target) {
case GL_TRANSFORM_FEEDBACK_BUFFER:
bind_xfb_buffers_range(ctx, first, count, buffers, offsets, sizes);
@@ -4061,6 +4079,11 @@ _mesa_BindBuffersBase(GLenum target, GLuint first, GLsizei count,
{
GET_CURRENT_CONTEXT(ctx);
+ if (MESA_VERBOSE & VERBOSE_API) {
+ _mesa_debug(ctx, "glBindBuffersBase(%s, %u, %d, %p)\n",
+ _mesa_enum_to_string(target), first, count, buffers);
+ }
+
switch (target) {
case GL_TRANSFORM_FEEDBACK_BUFFER:
bind_xfb_buffers_base(ctx, first, count, buffers);
More information about the mesa-commit
mailing list