mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
linker: Don't dynamically allocate slots for linked shaders
The can be at most one shader per stage. There are currently only two stages. There is zero reason to dynamically size this array.
This commit is contained in:
parent
edcb9c2b06
commit
ef5f194831
2 changed files with 6 additions and 3 deletions
|
|
@ -823,8 +823,6 @@ link_shaders(struct gl_shader_program *prog)
|
|||
goto done;
|
||||
|
||||
|
||||
prog->_LinkedShaders = (struct gl_shader **)
|
||||
calloc(2, sizeof(struct gl_shader *));
|
||||
prog->_NumLinkedShaders = 0;
|
||||
|
||||
if (num_vert_shaders > 0) {
|
||||
|
|
|
|||
|
|
@ -2006,8 +2006,13 @@ struct gl_shader_program
|
|||
GLboolean _Used; /**< Ever used for drawing? */
|
||||
GLchar *InfoLog;
|
||||
|
||||
/**
|
||||
* Per-stage shaders resulting from the first stage of linking.
|
||||
*/
|
||||
/*@{*/
|
||||
GLuint _NumLinkedShaders;
|
||||
struct gl_shader **_LinkedShaders;
|
||||
struct gl_shader *_LinkedShaders[2];
|
||||
/*@}*/
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue