mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 12:08:06 +02:00
mesa: move some uniform debug code from draws to state changes
This is a step towards removing _mesa_valid_to_render. I don't know what this code does. This commit probably breaks it, but it doesn't seem important. We could remove the code. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
This commit is contained in:
parent
ba10295bf8
commit
8e747d9af0
1 changed files with 27 additions and 27 deletions
|
|
@ -183,33 +183,6 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ctx->_Shader->Flags & GLSL_LOG) {
|
||||
struct gl_program **prog = ctx->_Shader->CurrentProgram;
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog[i] == NULL || prog[i]->_Used)
|
||||
continue;
|
||||
|
||||
/* This is the first time this shader is being used.
|
||||
* Append shader's constants/uniforms to log file.
|
||||
*
|
||||
* Only log data for the program target that matches the shader
|
||||
* target. It's possible to have a program bound to the vertex
|
||||
* shader target that also supplied a fragment shader. If that
|
||||
* program isn't also bound to the fragment shader target we don't
|
||||
* want to log its fragment data.
|
||||
*/
|
||||
_mesa_append_uniforms_to_file(prog[i]);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog[i] != NULL)
|
||||
prog[i]->_Used = GL_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -521,6 +494,33 @@ _mesa_update_valid_to_render_state(struct gl_context *ctx)
|
|||
mask &= ~(1 << GL_PATCHES);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (shader->Flags & GLSL_LOG) {
|
||||
struct gl_program **prog = shader->CurrentProgram;
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog[i] == NULL || prog[i]->_Used)
|
||||
continue;
|
||||
|
||||
/* This is the first time this shader is being used.
|
||||
* Append shader's constants/uniforms to log file.
|
||||
*
|
||||
* Only log data for the program target that matches the shader
|
||||
* target. It's possible to have a program bound to the vertex
|
||||
* shader target that also supplied a fragment shader. If that
|
||||
* program isn't also bound to the fragment shader target we don't
|
||||
* want to log its fragment data.
|
||||
*/
|
||||
_mesa_append_uniforms_to_file(prog[i]);
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog[i] != NULL)
|
||||
prog[i]->_Used = GL_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ctx->ValidPrimMask = mask;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue