mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 14:40:10 +01:00
mesa/glsl: add bitmask to track stages a program was linked against
This will be used to enable us to store the current gl_program rather than gl_shader_program in the gl_pipline_object allowing us to simplify handing of validation. Also we should not be depending on _LinkedShader for this information as it may contain shaders from a failed linking attempt rather than the current program still in use. We could also use this mask to iterate over the stages during linking with _mesa_bit_scan() rather then the current method of NULL checking each stage. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
ddf0f097e7
commit
34953f8907
2 changed files with 4 additions and 0 deletions
|
|
@ -4889,6 +4889,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
}
|
||||
|
||||
prog->_LinkedShaders[stage] = sh;
|
||||
prog->data->linked_stages |= 1 << stage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2652,6 +2652,9 @@ struct gl_shader_program_data
|
|||
GLboolean LinkStatus; /**< GL_LINK_STATUS */
|
||||
GLboolean Validated;
|
||||
GLchar *InfoLog;
|
||||
|
||||
/* Mask of stages this program was linked against */
|
||||
unsigned linked_stages;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue