wined3d: Introduce wined3d_stateblock_set_stream_source_freq().
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:
parent
9aef32c733
commit
0ed36213f4
|
@ -1611,6 +1611,36 @@ HRESULT CDECL wined3d_stateblock_set_stream_source(struct wined3d_stateblock *st
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT CDECL wined3d_stateblock_set_stream_source_freq(struct wined3d_stateblock *stateblock,
|
||||||
|
UINT stream_idx, UINT divider)
|
||||||
|
{
|
||||||
|
struct wined3d_stream_state *stream;
|
||||||
|
|
||||||
|
TRACE("stateblock %p, stream_idx %u, divider %#x.\n", stateblock, stream_idx, divider);
|
||||||
|
|
||||||
|
if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && (divider & WINED3DSTREAMSOURCE_INDEXEDDATA))
|
||||||
|
{
|
||||||
|
WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n");
|
||||||
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
}
|
||||||
|
if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !stream_idx)
|
||||||
|
{
|
||||||
|
WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n");
|
||||||
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
}
|
||||||
|
if (!divider)
|
||||||
|
{
|
||||||
|
WARN("Divider is 0, returning D3DERR_INVALIDCALL.\n");
|
||||||
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
stream = &stateblock->stateblock_state.streams[stream_idx];
|
||||||
|
stream->flags = divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA);
|
||||||
|
stream->frequency = divider & 0x7fffff;
|
||||||
|
stateblock->changed.streamFreq |= 1u << stream_idx;
|
||||||
|
return WINED3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info)
|
static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info)
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
|
|
|
@ -276,6 +276,7 @@
|
||||||
@ cdecl wined3d_stateblock_set_sampler_state(ptr long long long)
|
@ cdecl wined3d_stateblock_set_sampler_state(ptr long long long)
|
||||||
@ cdecl wined3d_stateblock_set_scissor_rect(ptr ptr)
|
@ cdecl wined3d_stateblock_set_scissor_rect(ptr ptr)
|
||||||
@ cdecl wined3d_stateblock_set_stream_source(ptr long ptr long long)
|
@ cdecl wined3d_stateblock_set_stream_source(ptr long ptr long long)
|
||||||
|
@ cdecl wined3d_stateblock_set_stream_source_freq(ptr long long)
|
||||||
@ cdecl wined3d_stateblock_set_texture(ptr long ptr)
|
@ cdecl wined3d_stateblock_set_texture(ptr long ptr)
|
||||||
@ cdecl wined3d_stateblock_set_texture_stage_state(ptr long long long)
|
@ cdecl wined3d_stateblock_set_texture_stage_state(ptr long long long)
|
||||||
@ cdecl wined3d_stateblock_set_transform(ptr long ptr)
|
@ cdecl wined3d_stateblock_set_transform(ptr long ptr)
|
||||||
|
|
|
@ -2690,6 +2690,7 @@ void __cdecl wined3d_stateblock_set_sampler_state(struct wined3d_stateblock *sta
|
||||||
void __cdecl wined3d_stateblock_set_scissor_rect(struct wined3d_stateblock *stateblock, const RECT *rect);
|
void __cdecl wined3d_stateblock_set_scissor_rect(struct wined3d_stateblock *stateblock, const RECT *rect);
|
||||||
HRESULT __cdecl wined3d_stateblock_set_stream_source(struct wined3d_stateblock *stateblock,
|
HRESULT __cdecl wined3d_stateblock_set_stream_source(struct wined3d_stateblock *stateblock,
|
||||||
UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride);
|
UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride);
|
||||||
|
HRESULT __cdecl wined3d_stateblock_set_stream_source_freq(struct wined3d_stateblock *stateblock, UINT stream_idx, UINT divider);
|
||||||
void __cdecl wined3d_stateblock_set_texture(struct wined3d_stateblock *stateblock, UINT stage, struct wined3d_texture *texture);
|
void __cdecl wined3d_stateblock_set_texture(struct wined3d_stateblock *stateblock, UINT stage, struct wined3d_texture *texture);
|
||||||
void __cdecl wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock,
|
void __cdecl wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock,
|
||||||
UINT stage, enum wined3d_texture_stage_state state, DWORD value);
|
UINT stage, enum wined3d_texture_stage_state state, DWORD value);
|
||||||
|
|
Loading…
Reference in New Issue