summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-08 17:30:03 -0500
committerIlia Mirkin <[email protected]>2016-11-08 19:28:35 -0500
commitf037afb701a8df8a646414e986b3561c8a798e05 (patch)
treea10d25ad4b7a84e94c054039547c7dbeba2f287a /src
parente2e40e236f32e9f627c4db98b4983d5271f42e92 (diff)
swr: disable logic op when the rt format is float or srgb
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 451ab5af114..ede475a8e34 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -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) {