summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-02 14:30:16 +0200
committerMarek Olšák <[email protected]>2017-05-10 19:00:16 +0200
commitc24c3b94ed29ecd99b1101c74c6c4606f9b5580e (patch)
tree81f6966bc59a68d9867693c65d35fae9bb1d9819 /src/gallium/drivers/ddebug
parentfe437882ea2d60e91c244cc95beb4b79c615af49 (diff)
gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytes
Diffstat (limited to 'src/gallium/drivers/ddebug')
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 63f115727b7..90ccf160e68 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -308,11 +308,10 @@ dd_dump_draw_vbo(struct dd_draw_state *dstate, struct pipe_draw_info *info, FILE
dd_dump_render_condition(dstate, f);
for (i = 0; i < PIPE_MAX_ATTRIBS; i++)
- if (dstate->vertex_buffers[i].buffer ||
- dstate->vertex_buffers[i].user_buffer) {
+ if (dstate->vertex_buffers[i].buffer.resource) {
DUMP_I(vertex_buffer, &dstate->vertex_buffers[i], i);
- if (dstate->vertex_buffers[i].buffer)
- DUMP_M(resource, &dstate->vertex_buffers[i], buffer);
+ if (!dstate->vertex_buffers[i].is_user_buffer)
+ DUMP_M(resource, &dstate->vertex_buffers[i], buffer.resource);
}
if (dstate->velems) {
@@ -765,7 +764,7 @@ dd_unreference_copy_of_draw_state(struct dd_draw_state_copy *state)
util_set_index_buffer(&dst->index_buffer, NULL);
for (i = 0; i < ARRAY_SIZE(dst->vertex_buffers); i++)
- pipe_resource_reference(&dst->vertex_buffers[i].buffer, NULL);
+ pipe_vertex_buffer_unreference(&dst->vertex_buffers[i]);
for (i = 0; i < ARRAY_SIZE(dst->so_targets); i++)
pipe_so_target_reference(&dst->so_targets[i], NULL);
@@ -802,10 +801,8 @@ dd_copy_draw_state(struct dd_draw_state *dst, struct dd_draw_state *src)
util_set_index_buffer(&dst->index_buffer, &src->index_buffer);
for (i = 0; i < ARRAY_SIZE(src->vertex_buffers); i++) {
- pipe_resource_reference(&dst->vertex_buffers[i].buffer,
- src->vertex_buffers[i].buffer);
- memcpy(&dst->vertex_buffers[i], &src->vertex_buffers[i],
- sizeof(src->vertex_buffers[i]));
+ pipe_vertex_buffer_reference(&dst->vertex_buffers[i],
+ &src->vertex_buffers[i]);
}
dst->num_so_targets = src->num_so_targets;