diff options
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/program.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 2097c395918..11330e24322 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -285,6 +285,8 @@ _mesa_init_vertex_program( GLcontext *ctx, struct gl_vertex_program *prog, struct gl_program * _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id) { + if (ctx->Driver.NewProgram) + return ctx->Driver.NewProgram(ctx, target, id); switch (target) { case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ return _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program), diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index a44e42b6d6d..5191e0c222f 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1847,6 +1847,7 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) n->Store->File = PROGRAM_TEMPORARY; n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); + A->program->NumTemporaries++; assert(n->Store->Size > 0); } return n; |