aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shared.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-09 23:38:46 +1100
committerTimothy Arceri <[email protected]>2017-01-06 11:21:42 +1100
commitf584f3821426955b94f36c77191edcfe1b1cc7d5 (patch)
tree043484b6571b8ab26fde0f128b98e245d67cec49 /src/mesa/main/shared.c
parent2784128398e405405f0263d318ebe4121d1baf4c (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/shared.c')
-rw-r--r--src/mesa/main/shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 04e54439a84..53448127389 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -70,9 +70,9 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
shared->Programs = _mesa_NewHashTable();
shared->DefaultVertexProgram =
- ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
+ ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0, true);
shared->DefaultFragmentProgram =
- ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
+ ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0, true);
shared->ATIShaders = _mesa_NewHashTable();
shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0);