1 #include "nv40_context.h"
4 nv40_state_blend_validate(struct nv40_context
*nv40
)
6 so_ref(nv40
->blend
->so
, &nv40
->state
.hw
[NV40_STATE_BLEND
]);
10 struct nv40_state_entry nv40_state_blend
= {
11 .validate
= nv40_state_blend_validate
,
13 .pipe
= NV40_NEW_BLEND
,
14 .hw
= NV40_STATE_BLEND
19 nv40_state_blend_colour_validate(struct nv40_context
*nv40
)
21 struct nouveau_stateobj
*so
= so_new(2, 0);
22 struct pipe_blend_color
*bcol
= &nv40
->blend_colour
;
24 so_method(so
, nv40
->screen
->curie
, NV40TCL_BLEND_COLOR
, 1);
25 so_data (so
, ((float_to_ubyte(bcol
->color
[3]) << 24) |
26 (float_to_ubyte(bcol
->color
[0]) << 16) |
27 (float_to_ubyte(bcol
->color
[1]) << 8) |
28 (float_to_ubyte(bcol
->color
[2]) << 0)));
30 so_ref(so
, &nv40
->state
.hw
[NV40_STATE_BCOL
]);
35 struct nv40_state_entry nv40_state_blend_colour
= {
36 .validate
= nv40_state_blend_colour_validate
,
38 .pipe
= NV40_NEW_BCOL
,