Module: Mesa Branch: main Commit: 2e2605e2971e2a807e7088a4c61f373f6fbd34e6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e2605e2971e2a807e7088a4c61f373f6fbd34e6
Author: Marek Olšák <[email protected]> Date: Tue Feb 21 00:27:58 2023 -0500 mesa: initialize VertexProgram._VaryingInputs before the first use Noticed by code inspection. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21438> --- src/mesa/main/context.c | 1 - src/mesa/program/program.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b40e41774dd..bfd511a364d 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -711,7 +711,6 @@ init_attrib_groups(struct gl_context *ctx) ctx->NewDriverState = ST_ALL_STATES_MASK; ctx->ErrorValue = GL_NO_ERROR; ctx->ShareGroupReset = false; - ctx->VertexProgram._VaryingInputs = VERT_BIT_ALL; ctx->IntelBlackholeRender = debug_get_bool_option("INTEL_BLACKHOLE_DEFAULT", false); return GL_TRUE; diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index bf1db64c327..9fee9f050a7 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -89,6 +89,7 @@ _mesa_init_program(struct gl_context *ctx) ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = strdup(""); + ctx->VertexProgram._VaryingInputs = VERT_BIT_ALL; ctx->VertexProgram.Enabled = GL_FALSE; ctx->VertexProgram.PointSizeEnabled = (ctx->API == API_OPENGLES2) ? GL_TRUE : GL_FALSE;
