lavapipe: Inline fill_ubo0
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28187>
This commit is contained in:
committed by
Marge Bot
parent
9482d8cc61
commit
fd8fd2d791
@@ -268,14 +268,6 @@ get_pcbuf_size(struct rendering_state *state, enum pipe_shader_type pstage)
|
||||
return state->has_pcbuf[pstage] ? state->push_size[type] : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
fill_ubo0(struct rendering_state *state, uint8_t *mem, enum pipe_shader_type pstage)
|
||||
{
|
||||
unsigned push_size = get_pcbuf_size(state, pstage);
|
||||
if (push_size)
|
||||
memcpy(mem, state->push_constants, push_size);
|
||||
}
|
||||
|
||||
static void
|
||||
update_pcbuf(struct rendering_state *state, enum pipe_shader_type pstage)
|
||||
{
|
||||
@@ -287,7 +279,7 @@ update_pcbuf(struct rendering_state *state, enum pipe_shader_type pstage)
|
||||
cbuf.buffer = NULL;
|
||||
cbuf.user_buffer = NULL;
|
||||
u_upload_alloc(state->uploader, 0, size, 64, &cbuf.buffer_offset, &cbuf.buffer, (void**)&mem);
|
||||
fill_ubo0(state, mem, pstage);
|
||||
memcpy(mem, state->push_constants, size);
|
||||
state->pctx->set_constant_buffer(state->pctx, pstage, 0, true, &cbuf);
|
||||
}
|
||||
state->pcbuf_dirty[pstage] = false;
|
||||
|
||||
Reference in New Issue
Block a user