From ec22b75be1c57f991f48bf6cc1d4b910911e8bf2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Sep 2011 08:15:14 -0600 Subject: softpipe: implement blend color clamping Per the GL spec, clamp incoming colors prior to blending depending on whether the destination buffer stores normalized (non-float) values. Note that the constant blend color needs to be clamped too (we always get the unclamped color from Mesa). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412 --- src/gallium/drivers/softpipe/sp_context.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/softpipe/sp_context.h') diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 410b0a65792..d51ce9fe333 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -75,6 +75,7 @@ struct softpipe_context { /** Other rendering state */ struct pipe_blend_color blend_color; + struct pipe_blend_color blend_color_clamped; struct pipe_stencil_ref stencil_ref; struct pipe_clip_state clip; struct pipe_resource *constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; -- cgit v1.2.3