1 #include "nv40_context.h"
4 nv40_state_viewport_validate(struct nvfx_context
*nvfx
)
6 struct pipe_viewport_state
*vpt
= &nvfx
->viewport
;
7 struct nouveau_stateobj
*so
;
9 if (nvfx
->state
.hw
[NVFX_STATE_VIEWPORT
] &&
10 !(nvfx
->dirty
& NVFX_NEW_VIEWPORT
))
14 so_method(so
, nvfx
->screen
->eng3d
,
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
, nvfx
->screen
->eng3d
, 0x1d78, 1);
27 so_ref(so
, &nvfx
->state
.hw
[NVFX_STATE_VIEWPORT
]);
32 struct nvfx_state_entry nv40_state_viewport
= {
33 .validate
= nv40_state_viewport_validate
,
35 .pipe
= NVFX_NEW_VIEWPORT
| NVFX_NEW_RAST
,
36 .hw
= NVFX_STATE_VIEWPORT