1 #include "nvfx_context.h"
4 nvfx_state_blend_validate(struct nvfx_context
*nvfx
)
6 so_ref(nvfx
->blend
->so
, &nvfx
->state
.hw
[NVFX_STATE_BLEND
]);
10 struct nvfx_state_entry nvfx_state_blend
= {
11 .validate
= nvfx_state_blend_validate
,
13 .pipe
= NVFX_NEW_BLEND
,
14 .hw
= NVFX_STATE_BLEND
19 nvfx_state_blend_colour_validate(struct nvfx_context
*nvfx
)
21 struct nouveau_stateobj
*so
= so_new(1, 1, 0);
22 struct pipe_blend_color
*bcol
= &nvfx
->blend_colour
;
24 so_method(so
, nvfx
->screen
->eng3d
, 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
, &nvfx
->state
.hw
[NVFX_STATE_BCOL
]);
35 struct nvfx_state_entry nvfx_state_blend_colour
= {
36 .validate
= nvfx_state_blend_colour_validate
,
38 .pipe
= NVFX_NEW_BCOL
,