1 #include "nv40_context.h"
4 nv40_state_viewport_validate(struct nv40_context
*nv40
)
6 struct pipe_viewport_state
*vpt
= &nv40
->viewport
;
7 struct nouveau_stateobj
*so
;
9 if (nv40
->state
.hw
[NV40_STATE_VIEWPORT
] &&
10 !(nv40
->dirty
& NV40_NEW_VIEWPORT
))
14 so_method(so
, nv40
->screen
->curie
,
15 NV40TCL_VIEWPORT_TRANSLATE_X
, 8);
16 so_data (so
, fui(vpt
->translate
[0]));
17 so_data (so
, fui(vpt
->translate
[1]));
18 so_data (so
, fui(vpt
->translate
[2]));
19 so_data (so
, fui(vpt
->translate
[3]));
20 so_data (so
, fui(vpt
->scale
[0]));
21 so_data (so
, fui(vpt
->scale
[1]));
22 so_data (so
, fui(vpt
->scale
[2]));
23 so_data (so
, fui(vpt
->scale
[3]));
24 so_method(so
, nv40
->screen
->curie
, 0x1d78, 1);
27 so_ref(so
, &nv40
->state
.hw
[NV40_STATE_VIEWPORT
]);
32 struct nv40_state_entry nv40_state_viewport
= {
33 .validate
= nv40_state_viewport_validate
,
35 .pipe
= NV40_NEW_VIEWPORT
| NV40_NEW_RAST
,
36 .hw
= NV40_STATE_VIEWPORT