swr: disable blending for integer formats
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 12 Nov 2016 18:27:28 +0000 (13:27 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 16 Nov 2016 01:25:43 +0000 (20:25 -0500)
The EXT_texture_integer test says that blending and alphatest should
all be disabled. st/mesa takes care of alphatest already.

Fixes the ext_texture_integer-fbo-blending piglit test.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_state.cpp

index 526d7e7307de2fb9ff59f02d17cc6a0c0ab4e5ba..783afba2b424d3a5454515d9a8ee9bf2f929de17 100644 (file)
@@ -1318,6 +1318,9 @@ swr_update_derived(struct pipe_context *pipe,
                compileState.blendState.logicOpEnable = false;
             }
 
+            if (info.type[0] == SWR_TYPE_SINT || info.type[0] == SWR_TYPE_UINT)
+               compileState.blendState.blendEnable = false;
+
             if (compileState.blendState.blendEnable == false &&
                 compileState.blendState.logicOpEnable == false &&
                 ctx->depth_stencil->alpha.enabled == 0) {