diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 20f8b3df99d..66811d29c29 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -84,6 +84,7 @@ void st_upload_constants( struct st_context *st, cb.buffer = NULL; cb.user_buffer = NULL; u_upload_data(st->constbuf_uploader, 0, paramBytes, + st->ctx->Const.UniformBufferOffsetAlignment, params->ParameterValues, &cb.buffer_offset, &cb.buffer); u_upload_unmap(st->constbuf_uploader); } else { diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 635a0126834..63b46222e6b 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -107,7 +107,7 @@ setup_index_buffer(struct st_context *st, else if (st->indexbuf_uploader) { /* upload indexes from user memory into a real buffer */ u_upload_data(st->indexbuf_uploader, 0, - ib->count * ibuffer->index_size, ib->ptr, + ib->count * ibuffer->index_size, 4, ib->ptr, &ibuffer->offset, &ibuffer->buffer); if (!ibuffer->buffer) { /* out of memory */ diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 90eb67711f3..9b01bdc129e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -314,10 +314,11 @@ void st_init_limits(struct pipe_screen *screen, c->GLSLSkipStrictMaxUniformLimitCheck = screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS); + c->UniformBufferOffsetAlignment = + screen->get_param(screen, PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT); + if (can_ubo) { extensions->ARB_uniform_buffer_object = GL_TRUE; - c->UniformBufferOffsetAlignment = - screen->get_param(screen, PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT); c->MaxCombinedUniformBlocks = c->MaxUniformBufferBindings = c->Program[MESA_SHADER_VERTEX].MaxUniformBlocks + c->Program[MESA_SHADER_TESS_CTRL].MaxUniformBlocks + |