From bbf029f7cf006d86a5dd13bf3bdd43f660ce2e51 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 17 Apr 2013 17:30:23 -0700 Subject: mesa: Move the mvp_with_dp4 flag to ShaderCompilerOptions. This flag essentially tells the compiler whether it prefers dot products or multiply/adds for matrix operations. As such, ShaderCompilerOptions seems like the right place for it. This also lets us specify it on a per-stage basis. This patch makes all existing users set the flag for the Vertex Shader stage only, as it's currently only used for fixed-function vertex programs. That will change soon, and I wanted to preserve the existing behavior. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- src/mesa/program/programopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/program') diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index 14868ab1e79..6a62e1f5867 100644 --- a/src/mesa/program/programopt.c +++ b/src/mesa/program/programopt.c @@ -219,7 +219,7 @@ _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vpro void _mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog) { - if (ctx->mvp_with_dp4) + if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4) _mesa_insert_mvp_dp4_code( ctx, vprog ); else _mesa_insert_mvp_mad_code( ctx, vprog ); -- cgit v1.2.3