From 95ed1c19bf379ace583adfe520e1673675d17062 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Fri, 4 Nov 2016 13:10:56 -0500 Subject: [PATCH] swr: allow alphatest without blend or logicop We need to compile a blend function when alphatest is enabled. Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/swr_state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 3e023225433..424bff2284f 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1300,7 +1300,8 @@ swr_update_derived(struct pipe_context *pipe, sizeof(compileState.blendState)); if (compileState.blendState.blendEnable == false && - compileState.blendState.logicOpEnable == false) { + compileState.blendState.logicOpEnable == false && + ctx->depth_stencil->alpha.enabled == 0) { SwrSetBlendFunc(ctx->swrContext, target, NULL); continue; } -- 2.30.2