diff options
author | Brian Paul <[email protected]> | 2011-09-14 08:15:14 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-14 08:15:59 -0600 |
commit | ec22b75be1c57f991f48bf6cc1d4b910911e8bf2 (patch) | |
tree | 452e1c4c36630428075b61c2910a52a9903b98f9 /src/gallium/drivers/softpipe/sp_context.h | |
parent | 4fc50d457065b974a7cfc3e63ab2a6da77490559 (diff) |
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
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.h')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.h | 1 |
1 files changed, 1 insertions, 0 deletions
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]; |