diff options
author | Marek Olšák <[email protected]> | 2018-01-10 20:03:28 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-01-17 20:17:59 +0100 |
commit | 85bbcdda34164865c8e603899a81463f1ad55ecf (patch) | |
tree | ef14a128da17c1b9e12f113c5adb49725995be35 /src/mesa/state_tracker/st_pbo.c | |
parent | 5981a5226ea1b0075443e40bc18b2d4b3cd76d2c (diff) |
st/mesa: assume that user constant buffers are always supported
Reviewed-by: Roland Scheidegger <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_pbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_pbo.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 303c8535b20..628e3ca64a5 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -259,21 +259,9 @@ st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr, { struct pipe_constant_buffer cb; - if (!st->has_user_constbuf) { - cb.buffer = NULL; - cb.user_buffer = NULL; - u_upload_data(st->pipe->const_uploader, 0, sizeof(addr->constants), - st->ctx->Const.UniformBufferOffsetAlignment, - &addr->constants, &cb.buffer_offset, &cb.buffer); - if (!cb.buffer) - return false; - - u_upload_unmap(st->pipe->const_uploader); - } else { - cb.buffer = NULL; - cb.user_buffer = &addr->constants; - cb.buffer_offset = 0; - } + cb.buffer = NULL; + cb.user_buffer = &addr->constants; + cb.buffer_offset = 0; cb.buffer_size = sizeof(addr->constants); cso_set_constant_buffer(cso, PIPE_SHADER_FRAGMENT, 0, &cb); |