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.
V2: set stage for arb asm programs also.
Reviewed-by: Eric Anholt <eric@anholt.net>
#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 */
prog->Target = target;
prog->RefCount = 1;
prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB;
+ prog->info.stage = _mesa_program_enum_to_shader_stage(target);
/* default mapping from samplers to texture units */
for (i = 0; i < MAX_SAMPLERS; i++)