summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 116f19f1ecf..5e3d58d1733 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1106,6 +1106,7 @@ swr_update_derived(struct pipe_context *pipe,
SWR_VERTEX_BUFFER_STATE swrVertexBuffers[PIPE_MAX_ATTRIBS];
for (UINT i = 0; i < ctx->num_vertex_buffers; i++) {
uint32_t size, pitch, elems, partial_inbounds;
+ uint32_t min_vertex_index;
const uint8_t *p_data;
struct pipe_vertex_buffer *vb = &ctx->vertex_buffer[i];
@@ -1117,6 +1118,7 @@ swr_update_derived(struct pipe_context *pipe,
size = vb->buffer->width0;
elems = size / pitch;
partial_inbounds = size % pitch;
+ min_vertex_index = 0;
p_data = swr_resource_data(vb->buffer) + vb->buffer_offset;
} else {
@@ -1128,6 +1130,7 @@ swr_update_derived(struct pipe_context *pipe,
uint32_t base;
swr_user_vbuf_range(&info, ctx->velems, vb, i, &elems, &base, &size);
partial_inbounds = 0;
+ min_vertex_index = info.min_index;
/* Copy only needed vertices to scratch space */
size = AlignUp(size, 4);
@@ -1143,6 +1146,7 @@ swr_update_derived(struct pipe_context *pipe,
swrVertexBuffers[i].pitch = pitch;
swrVertexBuffers[i].pData = p_data;
swrVertexBuffers[i].size = size;
+ swrVertexBuffers[i].minVertex = min_vertex_index;
swrVertexBuffers[i].maxVertex = elems;
swrVertexBuffers[i].partialInboundsSize = partial_inbounds;
}