<application name="Unigine Heaven (32-bit)" executable="heaven_x86">
<option name="allow_glsl_extension_directive_midshader" value="true" />
- <!-- remove disable_blend_func_extended if 4.1 ever comes out -->
- <option name="disable_blend_func_extended" value="true" />
+ <!-- remove dual_color_blend_by_location if 4.1 ever comes out -->
+ <option name="dual_color_blend_by_location" value="true" />
</application>
<application name="Unigine Heaven (64-bit)" executable="heaven_x64">
<option name="allow_glsl_extension_directive_midshader" value="true" />
- <!-- remove disable_blend_func_extended if 4.1 ever comes out -->
- <option name="disable_blend_func_extended" value="true" />
+ <!-- remove dual_color_blend_by_location if 4.1 ever comes out -->
+ <option name="dual_color_blend_by_location" value="true" />
</application>
<application name="Unigine Valley (32-bit)" executable="valley_x86">
<option name="allow_glsl_extension_directive_midshader" value="true" />
- <!-- remove disable_blend_func_extended if 1.1 ever comes out -->
- <option name="disable_blend_func_extended" value="true" />
+ <!-- remove dual_color_blend_by_location if 1.1 ever comes out -->
+ <option name="dual_color_blend_by_location" value="true" />
</application>
<application name="Unigine Valley (64-bit)" executable="valley_x64">
<option name="allow_glsl_extension_directive_midshader" value="true" />
- <!-- remove disable_blend_func_extended if 1.1 ever comes out -->
- <option name="disable_blend_func_extended" value="true" />
+ <!-- remove dual_color_blend_by_location if 1.1 ever comes out -->
+ <option name="dual_color_blend_by_location" value="true" />
</application>
<application name="Unigine OilRush (32-bit)" executable="OilRush_x86">
DRI_CONF_DESC(en,gettext("Disable dual source blending")) \
DRI_CONF_OPT_END
+#define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \
+DRI_CONF_OPT_BEGIN_B(dual_color_blend_by_location, def) \
+ DRI_CONF_DESC(en,gettext("Identify dual color blending sources by location rather than index")) \
+DRI_CONF_OPT_END
+
#define DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(def) \
DRI_CONF_OPT_BEGIN_B(disable_glsl_line_continuations, def) \
DRI_CONF_DESC(en,gettext("Disable backslash-based line continuations in GLSL source")) \
bool compute_sample_id:1;
unsigned line_aa:2;
bool high_quality_derivatives:1;
+ bool force_dual_color_blend:1;
uint16_t drawable_height;
uint64_t input_slots_valid;
ctx->Const.AllowGLSLExtensionDirectiveMidShader =
driQueryOptionb(options, "allow_glsl_extension_directive_midshader");
+
+ brw->dual_color_blend_by_location =
+ driQueryOptionb(options, "dual_color_blend_by_location");
}
GLboolean
bool always_flush_cache;
bool disable_throttling;
bool precompile;
+ bool dual_color_blend_by_location;
driOptionCache optionCache;
/** @} */
break;
}
case MESA_SHADER_FRAGMENT:
- if (var->data.index > 0) {
+ if (key->force_dual_color_blend &&
+ var->data.location == FRAG_RESULT_DATA1) {
+ this->dual_src_output = reg;
+ this->do_dual_src = true;
+ } else if (var->data.index > 0) {
assert(var->data.location == FRAG_RESULT_DATA0);
assert(var->data.index == 1);
this->dual_src_output = reg;
/* _NEW_BUFFERS */
key->nr_color_regions = ctx->DrawBuffer->_NumColorDrawBuffers;
+ /* _NEW_COLOR */
+ key->force_dual_color_blend = brw->dual_color_blend_by_location &&
+ (ctx->Color.BlendEnabled & 1) && ctx->Color.Blend[0]._UsesDualSrc;
+
/* _NEW_MULTISAMPLE, _NEW_COLOR, _NEW_BUFFERS */
key->replicate_alpha = ctx->DrawBuffer->_NumColorDrawBuffers > 1 &&
(ctx->Multisample.SampleAlphaToCoverage || ctx->Color.AlphaEnabled);
DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false")
DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
+ DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false")
DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")