ctx->Const.MaxDrawBuffers = 1;
ctx->Const.MaxColorAttachments = 1;
- _mesa_set_mvp_with_dp4( ctx, GL_TRUE );
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE;
/* Install the customized pipeline:
*/
ctx->Const.MaxColorAttachments = 1;
ctx->Const.MaxRenderbufferSize = 2048;
- _mesa_set_mvp_with_dp4( ctx, GL_TRUE );
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = true;
/* Install the customized pipeline:
*/
}
-/**
- * Set mvp_with_dp4 flag. If a driver has a preference for DP4 over
- * MUL/MAD, or vice versa, call this function to register that.
- * Otherwise we default to MUL/MAD.
- */
-void
-_mesa_set_mvp_with_dp4( struct gl_context *ctx,
- GLboolean flag )
-{
- ctx->mvp_with_dp4 = flag;
-}
-
/*
* ARB_blend_func_extended - ERRORS section
* "The error INVALID_OPERATION is generated by Begin or any procedure that
_mesa_get_dispatch(struct gl_context *ctx);
-void
-_mesa_set_mvp_with_dp4( struct gl_context *ctx,
- GLboolean flag );
-
-
extern GLboolean
_mesa_valid_to_render(struct gl_context *ctx, const char *where);
return NULL;
create_new_program( &key, prog,
- ctx->mvp_with_dp4,
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4,
ctx->Const.VertexProgram.MaxTemps );
#if 0
GLuint MaxIfDepth; /**< Maximum nested IF blocks */
GLuint MaxUnrollIterations;
+ /**
+ * Prefer DP4 instructions (rather than MUL/MAD) for matrix * vector
+ * operations, such as position transformation.
+ */
+ GLboolean PreferDP4;
+
struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
};
GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
- /**
- * Use dp4 (rather than mul/mad) instructions for position
- * transformation?
- */
- GLboolean mvp_with_dp4;
-
GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
/**
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 );
* driver prefers DP4 or MUL/MAD for vertex transformation.
*/
if (debug_get_option_mesa_mvp_dp4())
- _mesa_set_mvp_with_dp4( ctx, GL_TRUE );
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE;
return st_create_context_priv(ctx, pipe, options);
}