wined3d: Introduce wined3d_stateblock_set_texture_stage_state().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-10-19 12:23:58 -05:00 committed by Alexandre Julliard
parent d16d5be1d1
commit d2a44f45ad
3 changed files with 26 additions and 0 deletions

View File

@ -1462,6 +1462,29 @@ void CDECL wined3d_stateblock_set_sampler_state(struct wined3d_stateblock *state
stateblock->changed.samplerState[sampler_idx] |= 1u << state;
}
void CDECL wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock,
UINT stage, enum wined3d_texture_stage_state state, DWORD value)
{
TRACE("stateblock %p, stage %u, state %s, value %#x.\n",
stateblock, stage, debug_d3dtexturestate(state), value);
if (state > WINED3D_HIGHEST_TEXTURE_STATE)
{
WARN("Invalid state %#x passed.\n", state);
return;
}
if (stage > WINED3D_MAX_TEXTURES)
{
WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring.\n",
stage, WINED3D_MAX_TEXTURES);
return;
}
stateblock->stateblock_state.texture_states[stage][state] = value;
stateblock->changed.textureState[stage] |= 1u << state;
}
static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info)
{
union

View File

@ -265,6 +265,7 @@
@ cdecl wined3d_stateblock_set_ps_consts_i(ptr long long ptr)
@ cdecl wined3d_stateblock_set_render_state(ptr long long)
@ cdecl wined3d_stateblock_set_sampler_state(ptr long long long)
@ cdecl wined3d_stateblock_set_texture_stage_state(ptr long 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)

View File

@ -2673,6 +2673,8 @@ void __cdecl wined3d_stateblock_set_render_state(struct wined3d_stateblock *stat
enum wined3d_render_state state, DWORD value);
void __cdecl wined3d_stateblock_set_sampler_state(struct wined3d_stateblock *stateblock,
UINT sampler_idx, enum wined3d_sampler_state state, DWORD value);
void __cdecl wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock,
UINT stage, enum wined3d_texture_stage_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);