[Mesa-dev] [PATCH v2] swr: disable logic op when the rt format is float or srgb
Rowley, Timothy O
timothy.o.rowley at intel.com
Tue Nov 8 22:43:13 UTC 2016
I’d prefer parenthesis to clarify the logic "(foo && ((bar == bla) || footer)”.
With those added, Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>>
On Nov 8, 2016, at 4:30 PM, Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>> wrote:
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>>
---
src/gallium/drivers/swr/swr_state.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index d8a8ee1..d16c307 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) {
SwrSetBlendFunc(ctx->swrContext, target, NULL);
--
2.7.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161108/09d7d966/attachment.html>
More information about the mesa-dev
mailing list