mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-28 10:00:46 +00:00
mesa: move variable declaration to where its used
The variable replacement was unused when building w/o
ENABLE_SHADER_CACHE. Since we can mix variable declarations and code,
move it to where its used.
Fixes: 9f8dc3bf03
"utils: build sha1/disk cache only with
Android/Autoconf"
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
01874d5278
commit
6a5850b04a
@ -1768,8 +1768,6 @@ _mesa_ShaderSource(GLuint shaderObj, GLsizei count,
|
||||
GLcharARB *source;
|
||||
struct gl_shader *sh;
|
||||
|
||||
GLcharARB *replacement;
|
||||
|
||||
sh = _mesa_lookup_shader_err(ctx, shaderObj, "glShaderSourceARB");
|
||||
if (!sh)
|
||||
return;
|
||||
@ -1826,6 +1824,8 @@ _mesa_ShaderSource(GLuint shaderObj, GLsizei count,
|
||||
source[totalLength - 2] = '\0';
|
||||
|
||||
#ifdef ENABLE_SHADER_CACHE
|
||||
GLcharARB *replacement;
|
||||
|
||||
/* Dump original shader source to MESA_SHADER_DUMP_PATH and replace
|
||||
* if corresponding entry found from MESA_SHADER_READ_PATH.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user