1 #include "nv30_context.h"
4 nv30_state_blend_validate(struct nv30_context
*nv30
)
6 so_ref(nv30
->blend
->so
, &nv30
->state
.hw
[NV30_STATE_BLEND
]);
10 struct nv30_state_entry nv30_state_blend
= {
11 .validate
= nv30_state_blend_validate
,
13 .pipe
= NV30_NEW_BLEND
,
14 .hw
= NV30_STATE_BLEND
19 nv30_state_blend_colour_validate(struct nv30_context
*nv30
)
21 struct nouveau_stateobj
*so
= so_new(2, 0);
22 struct pipe_blend_color
*bcol
= &nv30
->blend_colour
;
24 so_method(so
, nv30
->screen
->rankine
, NV34TCL_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
, &nv30
->state
.hw
[NV30_STATE_BCOL
]);
34 struct nv30_state_entry nv30_state_blend_colour
= {
35 .validate
= nv30_state_blend_colour_validate
,
37 .pipe
= NV30_NEW_BCOL
,