so_method(so, screen->tesla, NV50TCL_LINKED_TSC, 1);
so_data (so, 1);
- /* activate first scissor rectangle */
- so_method(so, screen->tesla, NV50TCL_SCISSOR_ENABLE(0), 1);
- so_data (so, 1);
-
so_method(so, screen->tesla, NV50TCL_EDGEFLAG_ENABLE, 1);
so_data (so, 1); /* default edgeflag to TRUE */
nv50_rasterizer_state_create(struct pipe_context *pipe,
const struct pipe_rasterizer_state *cso)
{
- struct nouveau_stateobj *so = so_new(15, 21, 0);
+ struct nouveau_stateobj *so = so_new(16, 22, 0);
struct nouveau_grobj *tesla = nv50_context(pipe)->screen->tesla;
struct nv50_rasterizer_stateobj *rso =
CALLOC_STRUCT(nv50_rasterizer_stateobj);
* - point_sprite / sprite_coord_mode
*/
+ so_method(so, tesla, NV50TCL_SCISSOR_ENABLE(0), 1);
+ so_data (so, cso->scissor);
+
so_method(so, tesla, NV50TCL_SHADE_MODEL, 1);
so_data (so, cso->flatshade ? NV50TCL_SHADE_MODEL_FLAT :
NV50TCL_SHADE_MODEL_SMOOTH);
so_data (so, w << 16);
so_data (so, h << 16);
- /* we set scissors to framebuffer size when they're 'turned off' */
- nv50->dirty |= NV50_NEW_SCISSOR;
- so_ref(NULL, &nv50->state.hw[12]);
return so;
}
static struct nouveau_stateobj *
validate_scissor(struct nv50_context *nv50)
{
- struct pipe_rasterizer_state *rast = &nv50->rasterizer->pipe;
- struct pipe_scissor_state *s = &nv50->scissor;
struct nouveau_grobj *tesla = nv50->screen->tesla;
+ struct pipe_scissor_state *s = &nv50->scissor;
struct nouveau_stateobj *so;
- if (nv50->state.hw[12] &&
- (rast->scissor == 0 && nv50->state.scissor_enabled == 0))
- return NULL;
- nv50->state.scissor_enabled = rast->scissor;
-
so = so_new(1, 2, 0);
so_method(so, tesla, NV50TCL_SCISSOR_HORIZ(0), 2);
- if (nv50->state.scissor_enabled) {
- so_data(so, (s->maxx << 16) | s->minx);
- so_data(so, (s->maxy << 16) | s->miny);
- } else {
- so_data(so, (nv50->framebuffer.width << 16));
- so_data(so, (nv50->framebuffer.height << 16));
- }
-
+ so_data (so, (s->maxx << 16) | s->minx);
+ so_data (so, (s->maxy << 16) | s->miny);
return so;
}
{ validate_blend_colour , NV50_NEW_BLEND_COLOUR },
{ validate_stencil_ref , NV50_NEW_STENCIL_REF },
{ validate_stipple , NV50_NEW_STIPPLE },
- { validate_scissor , NV50_NEW_SCISSOR | NV50_NEW_RASTERIZER },
+ { validate_scissor , NV50_NEW_SCISSOR },
{ validate_viewport , NV50_NEW_VIEWPORT },
{ validate_sampler , NV50_NEW_SAMPLER },
{ nv50_tex_validate , NV50_NEW_TEXTURE | NV50_NEW_SAMPLER },