lavapipe: more small shader struct usage tweaks
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 6 Mar 2023 19:53:53 +0000 (14:53 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Mar 2023 18:25:01 +0000 (18:25 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

src/gallium/frontends/lavapipe/lvp_pipeline.c

index 97cf18a..e284a56 100644 (file)
@@ -516,10 +516,10 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
 
    nir_function_impl *impl = nir_shader_get_entrypoint(nir);
    if (impl->ssa_alloc > 100) //skip for small shaders
-      pipeline->shaders[stage].inlines.must_inline = lvp_find_inlinable_uniforms(pipeline, nir);
-   pipeline->shaders[stage].pipeline_nir = ralloc(NULL, struct lvp_pipeline_nir);
-   pipeline->shaders[stage].pipeline_nir->nir = nir;
-   pipeline->shaders[stage].pipeline_nir->ref_cnt = 1;
+      shader->inlines.must_inline = lvp_find_inlinable_uniforms(pipeline, nir);
+   shader->pipeline_nir = ralloc(NULL, struct lvp_pipeline_nir);
+   shader->pipeline_nir->nir = nir;
+   shader->pipeline_nir->ref_cnt = 1;
 
    return VK_SUCCESS;
 }