Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/stateblock.c | 15 +++++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 18 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index dae95ae46e8..42d1d9d4d81 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1419,6 +1419,21 @@ void CDECL wined3d_stateblock_set_vertex_declaration(struct wined3d_stateblock * stateblock->changed.vertexDecl = TRUE; }
+void CDECL wined3d_stateblock_set_render_state(struct wined3d_stateblock *stateblock, + enum wined3d_render_state state, DWORD value) +{ + TRACE("stateblock %p, state %s (%#x), value %#x.\n", stateblock, debug_d3drenderstate(state), state, value); + + if (state > WINEHIGHEST_RENDER_STATE) + { + WARN("Unhandled render state %#x.\n", state); + return; + } + + stateblock->stateblock_state.rs[state] = value; + stateblock->changed.renderState[state >> 5] |= 1u << (state & 0x1f); +} + static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info) { union diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index b65681f2108..488b1c4e650 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -262,6 +262,7 @@ @ cdecl wined3d_stateblock_set_ps_consts_b(ptr long long ptr) @ cdecl wined3d_stateblock_set_ps_consts_f(ptr long long ptr) @ cdecl wined3d_stateblock_set_ps_consts_i(ptr long long ptr) +@ cdecl wined3d_stateblock_set_render_state(ptr long long) @ cdecl wined3d_stateblock_set_vertex_declaration(ptr ptr) @ cdecl wined3d_stateblock_set_vertex_shader(ptr ptr) @ cdecl wined3d_stateblock_set_vs_consts_b(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f79cd212a1e..8d13a245ada 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2667,6 +2667,8 @@ HRESULT __cdecl wined3d_stateblock_set_ps_consts_f(struct wined3d_stateblock *st unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants); HRESULT __cdecl wined3d_stateblock_set_ps_consts_i(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants); +void __cdecl wined3d_stateblock_set_render_state(struct wined3d_stateblock *stateblock, + enum wined3d_render_state state, DWORD value); void __cdecl wined3d_stateblock_set_vertex_declaration(struct wined3d_stateblock *stateblock, struct wined3d_vertex_declaration *declaration); void __cdecl wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *stateblock, struct wined3d_shader *shader);