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); diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 768f053..6c05f38 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -32,6 +32,9 @@ extern "C" { #endif typedef struct shader_info { + /** The shader stage, such as MESA_SHADER_VERTEX. */ + gl_shader_stage stage; + const char *name; /* Descriptive name provided by the client; may be NULL */ -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev