mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
st/xorg: set up rasterizer state in init
This commit is contained in:
parent
86ba5139a8
commit
b4ea1eb871
3 changed files with 8 additions and 17 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue