summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
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/swr/swr_state.cpp
parentfe437882ea2d60e91c244cc95beb4b79c615af49 (diff)
gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytes
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 12b4e9d6398..d2a51faaa1e 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -744,8 +744,8 @@ swr_update_resource_status(struct pipe_context *pipe,
/* VBO vertex buffers */
for (uint32_t i = 0; i < ctx->num_vertex_buffers; i++) {
struct pipe_vertex_buffer *vb = &ctx->vertex_buffer[i];
- if (!vb->user_buffer)
- swr_resource_read(vb->buffer);
+ if (!vb->is_user_buffer)
+ swr_resource_read(vb->buffer.resource);
}
/* VBO index buffer */
@@ -1236,7 +1236,7 @@ swr_update_derived(struct pipe_context *pipe,
for (UINT i = 0; i < ctx->num_vertex_buffers; i++) {
struct pipe_vertex_buffer *vb = &ctx->vertex_buffer[i];
- if (!vb->user_buffer)
+ if (!vb->is_user_buffer)
continue;
uint32_t elems, base, size;
@@ -1258,16 +1258,16 @@ swr_update_derived(struct pipe_context *pipe,
struct pipe_vertex_buffer *vb = &ctx->vertex_buffer[i];
pitch = vb->stride;
- if (!vb->user_buffer) {
+ if (!vb->is_user_buffer) {
/* VBO
* size is based on buffer->width0 rather than info.max_index
* to prevent having to validate VBO on each draw */
- size = vb->buffer->width0;
+ size = vb->buffer.resource->width0;
elems = size / pitch;
partial_inbounds = size % pitch;
min_vertex_index = 0;
- p_data = swr_resource_data(vb->buffer) + vb->buffer_offset;
+ p_data = swr_resource_data(vb->buffer.resource) + vb->buffer_offset;
} else {
/* Client buffer
* client memory is one-time use, re-trigger SWR_NEW_VERTEX to
@@ -1281,7 +1281,7 @@ swr_update_derived(struct pipe_context *pipe,
/* Copy only needed vertices to scratch space */
size = AlignUp(size, 4);
- const void *ptr = (const uint8_t *) vb->user_buffer + base;
+ const void *ptr = (const uint8_t *) vb->buffer.user + base;
memcpy(scratch, ptr, size);
ptr = scratch;
scratch += size;