progress = do_copy_propagation(ir) || progress;
progress = do_copy_propagation_elements(ir) || progress;
- if (options->PreferDP4 && !linked)
+ if (options->OptimizeForAOS && !linked)
progress = opt_flip_matrices(ir) || progress;
if (linked)
ctx->ShaderCompilerOptions[i].LowerClipDistance = true;
}
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = true;
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = true;
/* ARB_viewport_array */
if (brw->gen >= 7 && ctx->API == API_OPENGL_CORE) {
ctx->Const.MaxDrawBuffers = 1;
ctx->Const.MaxColorAttachments = 1;
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE;
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = GL_TRUE;
/* Install the customized pipeline:
*/
ctx->Const.MaxColorAttachments = 1;
ctx->Const.MaxRenderbufferSize = 2048;
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = true;
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = true;
/* Install the customized pipeline:
*/
return NULL;
create_new_program( &key, prog,
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4,
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS,
ctx->Const.Program[MESA_SHADER_VERTEX].MaxTemps );
#if 0
GLuint MaxUnrollIterations;
/**
- * Prefer DP4 instructions (rather than MUL/MAD) for matrix * vector
- * operations, such as position transformation.
+ * Optimize code for array of structures backends.
+ *
+ * This is a proxy for:
+ * - preferring DP4 instructions (rather than MUL/MAD) for
+ * matrix * vector operations, such as position transformation.
*/
- GLboolean PreferDP4;
+ GLboolean OptimizeForAOS;
struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
};
void
_mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog)
{
- if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4)
+ if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS)
_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())
- ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE;
+ ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = GL_TRUE;
return st_create_context_priv(ctx, pipe, options);
}