aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xorg
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-26 10:15:01 +0000
committerKeith Whitwell <[email protected]>2009-11-26 11:23:36 +0000
commitb4ea1eb871ec0e5fffd70bf4da6cdec5d25b5c50 (patch)
treef3b7e9166b0615956a2d4d4fe83d9b4fb11bef28 /src/gallium/state_trackers/xorg
parent86ba5139a8078f05fa9e1a4b562854d5f3b783f3 (diff)
st/xorg: set up rasterizer state in init
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.c22
-rw-r--r--src/gallium/state_trackers/xorg/xorg_renderer.h1
3 files changed, 8 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index 99e357328d1..67e4eca68c5 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -492,7 +492,6 @@ boolean xorg_composite_bind_state(struct exa_context *exa,
renderer_bind_destination(exa->renderer, dst_surf);
bind_blend_state(exa, op, pSrcPicture, pMaskPicture, pDstPicture);
- renderer_bind_rasterizer(exa->renderer);
bind_shaders(exa, op, pSrcPicture, pMaskPicture, pDstPicture, pSrc, pMask);
bind_samplers(exa, op, pSrcPicture, pMaskPicture,
pDstPicture, pSrc, pMask, pDst);
@@ -561,7 +560,6 @@ boolean xorg_solid_bind_state(struct exa_context *exa,
fs_traits = FS_SOLID_FILL;
renderer_bind_destination(exa->renderer, dst_surf);
- renderer_bind_rasterizer(exa->renderer);
bind_blend_state(exa, PictOpSrc, NULL, NULL, NULL);
cso_set_samplers(exa->renderer->cso, 0, NULL);
cso_set_sampler_textures(exa->renderer->cso, 0, NULL);
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index 63a7883cd16..32b056a362e 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -97,10 +97,18 @@ static void
renderer_init_state(struct xorg_renderer *r)
{
struct pipe_depth_stencil_alpha_state dsa;
+ struct pipe_rasterizer_state raster;
/* set common initial clip state */
memset(&dsa, 0, sizeof(struct pipe_depth_stencil_alpha_state));
cso_set_depth_stencil_alpha(r->cso, &dsa);
+
+
+ /* XXX: move to renderer_init_state? */
+ memset(&raster, 0, sizeof(struct pipe_rasterizer_state));
+ raster.gl_rasterization_rules = 1;
+ cso_set_rasterizer(r->cso, &raster);
+
}
@@ -412,16 +420,6 @@ void renderer_destroy(struct xorg_renderer *r)
-void renderer_bind_rasterizer(struct xorg_renderer *r)
-{
- struct pipe_rasterizer_state raster;
-
- /* XXX: move to renderer_init_state? */
- memset(&raster, 0, sizeof(struct pipe_rasterizer_state));
- raster.gl_rasterization_rules = 1;
- cso_set_rasterizer(r->cso, &raster);
-}
-
void renderer_set_constants(struct xorg_renderer *r,
int shader_type,
const float *params,
@@ -533,8 +531,6 @@ static void renderer_copy_texture(struct xorg_renderer *r,
/* texture */
cso_set_sampler_textures(r->cso, 1, &src);
- renderer_bind_rasterizer(r);
-
/* shaders */
shader = xorg_shaders_get(r->shaders,
VS_COMPOSITE,
@@ -632,8 +628,6 @@ void renderer_copy_pixmap(struct xorg_renderer *r,
int width, int height)
{
float dst_loc[4], src_loc[4];
- float dst_bounds[4], src_bounds[4];
- float src_shift[4], dst_shift[4], shift[4];
struct pipe_texture *dst = dst_priv->tex;
struct pipe_texture *src = src_priv->tex;
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.h b/src/gallium/state_trackers/xorg/xorg_renderer.h
index 51e0272b46f..249bb719b6a 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.h
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.h
@@ -44,7 +44,6 @@ void renderer_bind_framebuffer(struct xorg_renderer *r,
struct exa_pixmap_priv *priv);
void renderer_bind_viewport(struct xorg_renderer *r,
struct exa_pixmap_priv *dst);
-void renderer_bind_rasterizer(struct xorg_renderer *r);
void renderer_set_constants(struct xorg_renderer *r,
int shader_type,
const float *buffer,