1 #include "nvfx_context.h"
4 nvfx_state_blend_validate(struct nvfx_context
*nvfx
)
6 struct nouveau_channel
* chan
= nvfx
->screen
->base
.channel
;
7 sb_emit(chan
, nvfx
->blend
->sb
, nvfx
->blend
->sb_len
);
11 struct nvfx_state_entry nvfx_state_blend
= {
12 .validate
= nvfx_state_blend_validate
,
14 .pipe
= NVFX_NEW_BLEND
,
19 nvfx_state_blend_colour_validate(struct nvfx_context
*nvfx
)
21 struct nouveau_channel
* chan
= nvfx
->screen
->base
.channel
;
22 struct pipe_blend_color
*bcol
= &nvfx
->blend_colour
;
25 OUT_RING(chan
, RING_3D(NV34TCL_BLEND_COLOR
, 1));
26 OUT_RING(chan
, ((float_to_ubyte(bcol
->color
[3]) << 24) |
27 (float_to_ubyte(bcol
->color
[0]) << 16) |
28 (float_to_ubyte(bcol
->color
[1]) << 8) |
29 (float_to_ubyte(bcol
->color
[2]) << 0)));
33 struct nvfx_state_entry nvfx_state_blend_colour
= {
34 .validate
= nvfx_state_blend_colour_validate
,
36 .pipe
= NVFX_NEW_BCOL
,