swr: disable logic op when the rt format is float or srgb

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
This commit is contained in:
Ilia Mirkin
2016-11-08 17:30:03 -05:00
parent e2e40e236f
commit f037afb701
+6
View File
@@ -1305,6 +1305,12 @@ swr_update_derived(struct pipe_context *pipe,
&ctx->blend->compileState[target],
sizeof(compileState.blendState));
const SWR_FORMAT_INFO& info = GetFormatInfo(compileState.format);
if (compileState.blendState.logicOpEnable &&
((info.type[0] == SWR_TYPE_FLOAT) || info.isSRGB)) {
compileState.blendState.logicOpEnable = false;
}
if (compileState.blendState.blendEnable == false &&
compileState.blendState.logicOpEnable == false &&
ctx->depth_stencil->alpha.enabled == 0) {