From fd8fd2d7915bef94ac4da02223844fc4b8ed2c3f Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Fri, 15 Mar 2024 19:04:54 +0100 Subject: [PATCH] lavapipe: Inline fill_ubo0 Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 6d47ef817c7..247affd460e 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -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;