Timothy Arceri <timothy.arc...@collabora.com> writes: > This will allow us to simplify the current program logic for SSO. > > Also since we aim to detach shader_info from nir_shader this will come > in handy avoiding passing nir_shader around just to keep track of > the stage we are dealing with. > --- > src/compiler/glsl/linker.cpp | 2 ++ > src/compiler/shader_info.h | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index 5508d58..05f8ddb 100644 > --- a/src/compiler/glsl/linker.cpp > +++ b/src/compiler/glsl/linker.cpp > @@ -2202,6 +2202,8 @@ link_intrastage_shaders(void *mem_ctx, > ctx->Driver.NewProgram(ctx, > > _mesa_shader_stage_to_program(shader_list[0]->Stage), > prog->Name); > + gl_prog->info.stage = shader_list[0]->Stage; > + > if (!gl_prog) { > prog->data->LinkStatus = false; > _mesa_delete_linked_shader(ctx, linked);
I don't think this is initializing it in enough places -- ARB programs will end up having a zero-initialized value for the stage, right? Could we just initialize the stage in the gl_prog from _mesa_init_gl_program()?
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev