From de69fc1703f79e5c97e66b654de7a93b7abce8f0 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 18 Sep 2007 10:02:16 -0400 Subject: Finishing up rename of the setup state to the rasterizer state. --- src/mesa/pipe/softpipe/Makefile | 2 +- src/mesa/pipe/softpipe/sp_context.c | 2 +- src/mesa/pipe/softpipe/sp_state_rasterizer.c | 65 ++++++++++++++++++++++++++++ src/mesa/pipe/softpipe/sp_state_setup.c | 65 ---------------------------- 4 files changed, 67 insertions(+), 67 deletions(-) create mode 100644 src/mesa/pipe/softpipe/sp_state_rasterizer.c delete mode 100644 src/mesa/pipe/softpipe/sp_state_setup.c (limited to 'src/mesa/pipe/softpipe') diff --git a/src/mesa/pipe/softpipe/Makefile b/src/mesa/pipe/softpipe/Makefile index 401df1cfb7..0335f56b99 100644 --- a/src/mesa/pipe/softpipe/Makefile +++ b/src/mesa/pipe/softpipe/Makefile @@ -29,7 +29,7 @@ DRIVER_SOURCES = \ sp_state_feedback.c \ sp_state_fs.c \ sp_state_sampler.c \ - sp_state_setup.c \ + sp_state_rasterizer.c \ sp_state_surface.c \ sp_state_vertex.c \ sp_tex_layout.c \ diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 7753ce40d7..cf5fc2227e 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -318,7 +318,7 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, */ softpipe->draw = draw_create(); assert(softpipe->draw); - draw_set_setup_stage(softpipe->draw, sp_draw_render_stage(softpipe)); + draw_set_rasterize_stage(softpipe->draw, sp_draw_render_stage(softpipe)); sp_init_region_functions(softpipe); sp_init_surface_functions(softpipe); diff --git a/src/mesa/pipe/softpipe/sp_state_rasterizer.c b/src/mesa/pipe/softpipe/sp_state_rasterizer.c new file mode 100644 index 0000000000..d832adb91b --- /dev/null +++ b/src/mesa/pipe/softpipe/sp_state_rasterizer.c @@ -0,0 +1,65 @@ +/************************************************************************** + * + * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include "pipe/p_defines.h" +#include "sp_context.h" +#include "sp_state.h" +#include "pipe/draw/draw_context.h" + + + +const struct pipe_rasterizer_state * +softpipe_create_rasterizer_state(struct pipe_context *pipe, + const struct pipe_rasterizer_state *setup) +{ + struct pipe_rasterizer_state *raster = + malloc(sizeof(struct pipe_rasterizer_state)); + memcpy(raster, setup, sizeof(struct pipe_rasterizer_state)); + + return raster; +} + +void softpipe_bind_rasterizer_state(struct pipe_context *pipe, + const struct pipe_rasterizer_state *setup) +{ + struct softpipe_context *softpipe = softpipe_context(pipe); + + /* pass-through to draw module */ + draw_set_rasterizer_state(softpipe->draw, setup); + + softpipe->rasterizer = setup; + + softpipe->dirty |= SP_NEW_RASTERIZER; +} + +void softpipe_delete_rasterizer_state(struct pipe_context *pipe, + const struct pipe_rasterizer_state *rasterizer) +{ + free((struct pipe_rasterizer_state*)rasterizer); +} + + diff --git a/src/mesa/pipe/softpipe/sp_state_setup.c b/src/mesa/pipe/softpipe/sp_state_setup.c deleted file mode 100644 index 6788396355..0000000000 --- a/src/mesa/pipe/softpipe/sp_state_setup.c +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************** - * - * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_defines.h" -#include "sp_context.h" -#include "sp_state.h" -#include "pipe/draw/draw_context.h" - - - -const struct pipe_rasterizer_state * -softpipe_create_rasterizer_state(struct pipe_context *pipe, - const struct pipe_rasterizer_state *setup) -{ - struct pipe_rasterizer_state *raster = - malloc(sizeof(struct pipe_rasterizer_state)); - memcpy(raster, setup, sizeof(struct pipe_rasterizer_state)); - - return raster; -} - -void softpipe_bind_rasterizer_state(struct pipe_context *pipe, - const struct pipe_rasterizer_state *setup) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - /* pass-through to draw module */ - draw_set_setup_state(softpipe->draw, setup); - - softpipe->rasterizer = setup; - - softpipe->dirty |= SP_NEW_RASTERIZER; -} - -void softpipe_delete_rasterizer_state(struct pipe_context *pipe, - const struct pipe_rasterizer_state *rasterizer) -{ - free((struct pipe_rasterizer_state*)rasterizer); -} - - -- cgit v1.2.3