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 3e023225433bc0eba2155068fe5f266eb6928ce5..424bff2284f3a74be41bf8ca0567c06a9e5234a3 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;
             }