swr: allow alphatest without blend or logicop
authorTim Rowley <timothy.o.rowley@intel.com>
Fri, 4 Nov 2016 18:10:56 +0000 (13:10 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Tue, 8 Nov 2016 20:18:47 +0000 (14:18 -0600)
We need to compile a blend function when alphatest is enabled.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_state.cpp

index 3e02322..424bff2 100644 (file)
@@ -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;
             }