1 #include "nv30_context.h"
4 nv30_state_scissor_validate(struct nv30_context
*nv30
)
6 struct pipe_rasterizer_state
*rast
= &nv30
->rasterizer
->pipe
;
7 struct pipe_scissor_state
*s
= &nv30
->scissor
;
8 struct nouveau_stateobj
*so
;
10 if (nv30
->state
.hw
[NV30_STATE_SCISSOR
] &&
11 (rast
->scissor
== 0 && nv30
->state
.scissor_enabled
== 0))
13 nv30
->state
.scissor_enabled
= rast
->scissor
;
16 so_method(so
, nv30
->screen
->rankine
, NV34TCL_SCISSOR_HORIZ
, 2);
17 if (nv30
->state
.scissor_enabled
) {
18 so_data (so
, ((s
->maxx
- s
->minx
) << 16) | s
->minx
);
19 so_data (so
, ((s
->maxy
- s
->miny
) << 16) | s
->miny
);
21 so_data (so
, 4096 << 16);
22 so_data (so
, 4096 << 16);
25 so_ref(so
, &nv30
->state
.hw
[NV30_STATE_SCISSOR
]);
29 struct nv30_state_entry nv30_state_scissor
= {
30 .validate
= nv30_state_scissor_validate
,
32 .pipe
= NV30_NEW_SCISSOR
| NV30_NEW_RAST
,
33 .hw
= NV30_STATE_SCISSOR