summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-11 17:24:24 +0200
committerMarek Olšák <[email protected]>2011-09-11 18:29:27 +0200
commit4682e706012fe26627a2f827db01b5068cc62814 (patch)
tree640717b8898a4bf2e7dde1fa474a88159efee07e /src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
parent2154c672b3f2a0f3de7aaacd9260954b9310262a (diff)
pb_buffer: inline 'base' sub-struct
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 7604e75af8d..b9237359e6e 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -162,7 +162,7 @@ pb_debug_buffer_fill(struct pb_debug_buffer *buf)
assert(map);
if(map) {
fill_random_pattern(map, buf->underflow_size);
- fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ fill_random_pattern(map + buf->underflow_size + buf->base.size,
buf->overflow_size);
pb_unmap(buf->buffer);
}
@@ -196,12 +196,12 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
buf->underflow_size - max_ofs);
}
- overflow = !check_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ overflow = !check_random_pattern(map + buf->underflow_size + buf->base.size,
buf->overflow_size,
&min_ofs, &max_ofs);
if(overflow) {
debug_printf("buffer overflow (size %u plus offset %u to %u%s bytes) detected\n",
- buf->base.base.size,
+ buf->base.size,
min_ofs,
max_ofs,
max_ofs == buf->overflow_size - 1 ? "+" : "");
@@ -216,7 +216,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
if(underflow)
fill_random_pattern(map, buf->underflow_size);
if(overflow)
- fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ fill_random_pattern(map + buf->underflow_size + buf->base.size,
buf->overflow_size);
pb_unmap(buf->buffer);
@@ -230,7 +230,7 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
struct pb_debug_manager *mgr = buf->mgr;
- assert(!pipe_is_referenced(&buf->base.base.reference));
+ assert(!pipe_is_referenced(&buf->base.reference));
pb_debug_buffer_check(buf);
@@ -352,7 +352,7 @@ pb_debug_manager_dump(struct pb_debug_manager *mgr)
buf = LIST_ENTRY(struct pb_debug_buffer, curr, head);
debug_printf("buffer = %p\n", (void *) buf);
- debug_printf(" .size = 0x%x\n", buf->base.base.size);
+ debug_printf(" .size = 0x%x\n", buf->base.size);
debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE);
curr = next;
@@ -400,21 +400,21 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
return NULL;
}
- assert(pipe_is_referenced(&buf->buffer->base.reference));
- assert(pb_check_alignment(real_desc.alignment, buf->buffer->base.alignment));
- assert(pb_check_usage(real_desc.usage, buf->buffer->base.usage));
- assert(buf->buffer->base.size >= real_size);
+ assert(pipe_is_referenced(&buf->buffer->reference));
+ assert(pb_check_alignment(real_desc.alignment, buf->buffer->alignment));
+ assert(pb_check_usage(real_desc.usage, buf->buffer->usage));
+ assert(buf->buffer->size >= real_size);
- pipe_reference_init(&buf->base.base.reference, 1);
- buf->base.base.alignment = desc->alignment;
- buf->base.base.usage = desc->usage;
- buf->base.base.size = size;
+ pipe_reference_init(&buf->base.reference, 1);
+ buf->base.alignment = desc->alignment;
+ buf->base.usage = desc->usage;
+ buf->base.size = size;
buf->base.vtbl = &pb_debug_buffer_vtbl;
buf->mgr = mgr;
buf->underflow_size = mgr->underflow_size;
- buf->overflow_size = buf->buffer->base.size - buf->underflow_size - size;
+ buf->overflow_size = buf->buffer->size - buf->underflow_size - size;
debug_backtrace_capture(buf->create_backtrace, 1, PB_DEBUG_CREATE_BACKTRACE);