1 #include "nv40_context.h"
4 nv40_state_viewport_validate(struct nv40_context
*nv40
)
6 struct nouveau_stateobj
*so
= so_new(9, 0);
7 struct pipe_viewport_state
*vpt
= &nv40
->viewport
;
9 so_method(so
, nv40
->screen
->curie
, NV40TCL_VIEWPORT_TRANSLATE_X
, 8);
10 so_data (so
, fui(vpt
->translate
[0]));
11 so_data (so
, fui(vpt
->translate
[1]));
12 so_data (so
, fui(vpt
->translate
[2]));
13 so_data (so
, fui(vpt
->translate
[3]));
14 so_data (so
, fui(vpt
->scale
[0]));
15 so_data (so
, fui(vpt
->scale
[1]));
16 so_data (so
, fui(vpt
->scale
[2]));
17 so_data (so
, fui(vpt
->scale
[3]));
19 so_ref(so
, &nv40
->state
.hw
[NV40_STATE_VIEWPORT
]);
23 struct nv40_state_entry nv40_state_viewport
= {
24 .validate
= nv40_state_viewport_validate
,
26 .pipe
= NV40_NEW_VIEWPORT
,
27 .hw
= NV40_STATE_VIEWPORT