sp_state_blend.c revision 7658a0208aa31f1443be6eaa720a383b34e2bbb3
17658a0208aa31f1443be6eaa720a383b34e2bbb3Brian/************************************************************************** 27658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * 37658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. 47658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * All Rights Reserved. 57658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * 67658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * Permission is hereby granted, free of charge, to any person obtaining a 77658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * copy of this software and associated documentation files (the 87658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * "Software"), to deal in the Software without restriction, including 97658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * without limitation the rights to use, copy, modify, merge, publish, 107658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * distribute, sub license, and/or sell copies of the Software, and to 117658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * permit persons to whom the Software is furnished to do so, subject to 127658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * the following conditions: 137658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * 147658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * The above copyright notice and this permission notice (including the 157658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * next paragraph) shall be included in all copies or substantial portions 167658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * of the Software. 177658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * 187658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 197658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 207658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 217658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 227658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 237658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 247658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 257658a0208aa31f1443be6eaa720a383b34e2bbb3Brian * 267658a0208aa31f1443be6eaa720a383b34e2bbb3Brian **************************************************************************/ 277658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 287658a0208aa31f1443be6eaa720a383b34e2bbb3Brian/* Authors: Keith Whitwell <keith@tungstengraphics.com> 297658a0208aa31f1443be6eaa720a383b34e2bbb3Brian */ 307658a0208aa31f1443be6eaa720a383b34e2bbb3Brian#include "imports.h" 317658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 327658a0208aa31f1443be6eaa720a383b34e2bbb3Brian#include "sp_context.h" 337658a0208aa31f1443be6eaa720a383b34e2bbb3Brian#include "sp_state.h" 347658a0208aa31f1443be6eaa720a383b34e2bbb3Brian#include "sp_draw.h" 357658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 367658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 377658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 387658a0208aa31f1443be6eaa720a383b34e2bbb3Brianvoid softpipe_set_blend_state( struct pipe_context *pipe, 397658a0208aa31f1443be6eaa720a383b34e2bbb3Brian const struct pipe_blend_state *blend ) 407658a0208aa31f1443be6eaa720a383b34e2bbb3Brian{ 417658a0208aa31f1443be6eaa720a383b34e2bbb3Brian struct softpipe_context *softpipe = softpipe_context(pipe); 427658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 437658a0208aa31f1443be6eaa720a383b34e2bbb3Brian softpipe->blend = *blend; 447658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 457658a0208aa31f1443be6eaa720a383b34e2bbb3Brian softpipe->dirty |= G_NEW_BLEND; 467658a0208aa31f1443be6eaa720a383b34e2bbb3Brian} 477658a0208aa31f1443be6eaa720a383b34e2bbb3Brian 48