1 #include "nv30_context.h"
4 nv30_state_viewport_validate(struct nv30_context
*nv30
)
6 struct pipe_viewport_state
*vpt
= &nv30
->viewport
;
7 struct nouveau_stateobj
*so
;
9 if (nv30
->state
.hw
[NV30_STATE_VIEWPORT
] &&
10 !(nv30
->dirty
& NV30_NEW_VIEWPORT
))
13 so
= so_new(3, 10, 0);
14 so_method(so
, nv30
->screen
->rankine
,
15 NV34TCL_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, nv30->screen->rankine, 0x1d78, 1);
27 /* TODO/FIXME: never saw value 0x0110 in renouveau dumps, only 0x0001 */
28 so_method(so
, nv30
->screen
->rankine
, 0x1d78, 1);
31 so_ref(so
, &nv30
->state
.hw
[NV30_STATE_VIEWPORT
]);
36 struct nv30_state_entry nv30_state_viewport
= {
37 .validate
= nv30_state_viewport_validate
,
39 .pipe
= NV30_NEW_VIEWPORT
| NV30_NEW_RAST
,
40 .hw
= NV30_STATE_VIEWPORT