lavapipe: create gfx gallium csos at pipeline bind

this should minimize pipeline creation time and make fast-linking "fast"

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21051>
This commit is contained in:
Mike Blumenkrantz 2023-02-01 10:46:13 -05:00 committed by Marge Bot
parent 6f0303ba76
commit 408606af02
2 changed files with 2 additions and 1 deletions

View file

@ -641,6 +641,7 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd,
{
LVP_FROM_HANDLE(lvp_pipeline, pipeline, cmd->u.bind_pipeline.pipeline);
const struct vk_graphics_pipeline_state *ps = &pipeline->graphics_state;
lvp_pipeline_shaders_compile(pipeline);
for (enum pipe_shader_type sh = PIPE_SHADER_VERTEX; sh < PIPE_SHADER_COMPUTE; sh++) {
state->iv_dirty[sh] |= state->num_shader_images[sh] &&

View file

@ -870,7 +870,7 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
pipeline->line_rectangular = true;
lvp_pipeline_xfb_init(pipeline);
}
if (!pipeline->library)
if (!libstate && !pipeline->library)
lvp_pipeline_shaders_compile(pipeline);
if (!pipeline->library && !pipeline->pipeline_nir[MESA_SHADER_FRAGMENT]) {