From f584f3821426955b94f36c77191edcfe1b1cc7d5 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 9 Nov 2016 23:38:46 +1100 Subject: st/mesa/glsl: add new is_arb_asm flag in gl_program Set the flag via the _mesa_init_gl_program() and NewProgram() helpers. In i965 we currently check for the existance of gl_shader_program to decide if this is an ARB assembly style program or not. Adding a flag makes the code clearer and will help removes a dependency on gl_shader_program in the i965 codegen functions. Also this will allow use to skip initialising sampler units for linked shaders, we currently memset it to zero again during linking. Reviewed-by: Eric Anholt --- src/mesa/program/program.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/program/program.h') diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index 18122f75b74..296fa40fbc1 100644 --- a/src/mesa/program/program.h +++ b/src/mesa/program/program.h @@ -64,10 +64,12 @@ extern void _mesa_set_program_error(struct gl_context *ctx, GLint pos, const char *string); extern struct gl_program * -_mesa_init_gl_program(struct gl_program *prog, GLenum target, GLuint id); +_mesa_init_gl_program(struct gl_program *prog, GLenum target, GLuint id, + bool is_arb_asm); extern struct gl_program * -_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id); +_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id, + bool is_arb_asm); extern void _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog); -- cgit v1.2.3