mesa: move _Used to gl_program
We no longer need to initialise it because gl_program is never reused. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -4748,7 +4748,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||||||
{
|
{
|
||||||
prog->data->LinkStatus = true; /* All error paths will set this to false */
|
prog->data->LinkStatus = true; /* All error paths will set this to false */
|
||||||
prog->data->Validated = false;
|
prog->data->Validated = false;
|
||||||
prog->_Used = false;
|
|
||||||
|
|
||||||
/* Section 7.3 (Program Objects) of the OpenGL 4.5 Core Profile spec says:
|
/* Section 7.3 (Program Objects) of the OpenGL 4.5 Core Profile spec says:
|
||||||
*
|
*
|
||||||
|
@@ -197,8 +197,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
|
|||||||
gl_shader_stage i;
|
gl_shader_stage i;
|
||||||
|
|
||||||
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||||
if (shProg[i] == NULL || shProg[i]->_Used
|
if (shProg[i] == NULL || shProg[i]->_LinkedShaders[i] == NULL ||
|
||||||
|| shProg[i]->_LinkedShaders[i] == NULL)
|
shProg[i]->_LinkedShaders[i]->Program->_Used)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* This is the first time this shader is being used.
|
/* This is the first time this shader is being used.
|
||||||
@@ -214,8 +214,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
for (i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||||
if (shProg[i] != NULL)
|
if (shProg[i] != NULL && shProg[i]->_LinkedShaders[i] != NULL)
|
||||||
shProg[i]->_Used = GL_TRUE;
|
shProg[i]->_LinkedShaders[i]->Program->_Used = GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1921,6 +1921,8 @@ struct gl_program
|
|||||||
GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_GEOMETRY_PROGRAM_NV */
|
GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_GEOMETRY_PROGRAM_NV */
|
||||||
GLenum Format; /**< String encoding format */
|
GLenum Format; /**< String encoding format */
|
||||||
|
|
||||||
|
GLboolean _Used; /**< Ever used for drawing? Used for debugging */
|
||||||
|
|
||||||
struct nir_shader *nir;
|
struct nir_shader *nir;
|
||||||
|
|
||||||
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
|
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
|
||||||
@@ -2842,7 +2844,6 @@ struct gl_shader_program
|
|||||||
*/
|
*/
|
||||||
struct string_to_uint_map *UniformHash;
|
struct string_to_uint_map *UniformHash;
|
||||||
|
|
||||||
GLboolean _Used; /**< Ever used for drawing? */
|
|
||||||
GLboolean SamplersValidated; /**< Samplers validated against texture units? */
|
GLboolean SamplersValidated; /**< Samplers validated against texture units? */
|
||||||
|
|
||||||
bool IsES; /**< True if this program uses GLSL ES */
|
bool IsES; /**< True if this program uses GLSL ES */
|
||||||
|
Reference in New Issue
Block a user