[Mesa-dev] [PATCH 01/70] mesa/compiler: add stage to shader_info
Eric Anholt
eric at anholt.net
Tue Dec 27 17:07:36 UTC 2016
Timothy Arceri <timothy.arceri at 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()?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161227/f76111e3/attachment.sig>
More information about the mesa-dev
mailing list