Commit a2c552f7 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Move struct wined3d_stateblock into stateblock.c.

parent fb0c4ec5
......@@ -28,6 +28,63 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
struct wined3d_saved_states
{
uint32_t vs_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_VS_CONSTS_F)];
uint16_t vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
uint16_t vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)];
uint16_t pixelShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
uint16_t pixelShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
uint32_t transform[WINED3D_BITMAP_SIZE(WINED3D_HIGHEST_TRANSFORM_STATE + 1)];
uint16_t streamSource; /* WINED3D_MAX_STREAMS, 16 */
uint16_t streamFreq; /* WINED3D_MAX_STREAMS, 16 */
uint32_t renderState[WINED3D_BITMAP_SIZE(WINEHIGHEST_RENDER_STATE + 1)];
uint32_t textureState[WINED3D_MAX_TEXTURES]; /* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */
uint16_t samplerState[WINED3D_MAX_COMBINED_SAMPLERS]; /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */
uint32_t clipplane; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
uint32_t textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
uint32_t indices : 1;
uint32_t material : 1;
uint32_t viewport : 1;
uint32_t vertexDecl : 1;
uint32_t pixelShader : 1;
uint32_t vertexShader : 1;
uint32_t scissorRect : 1;
uint32_t store_stream_offset : 1;
uint32_t alpha_to_coverage : 1;
uint32_t lights : 1;
uint32_t transforms : 1;
uint32_t padding : 1;
struct list changed_lights;
};
struct stage_state
{
unsigned int stage, state;
};
struct wined3d_stateblock
{
LONG ref;
struct wined3d_device *device;
struct wined3d_saved_states changed;
struct wined3d_stateblock_state stateblock_state;
struct wined3d_light_state light_state;
unsigned int contained_render_states[WINEHIGHEST_RENDER_STATE + 1];
unsigned int num_contained_render_states;
unsigned int contained_transform_states[WINED3D_HIGHEST_TRANSFORM_STATE + 1];
unsigned int num_contained_transform_states;
struct stage_state contained_tss_states[WINED3D_MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1)];
unsigned int num_contained_tss_states;
struct stage_state contained_sampler_states[WINED3D_MAX_COMBINED_SAMPLERS * WINED3D_HIGHEST_SAMPLER_STATE];
unsigned int num_contained_sampler_states;
};
static const DWORD pixel_states_render[] =
{
WINED3D_RS_ALPHABLENDENABLE,
......
......@@ -3549,65 +3549,6 @@ struct wined3d_vertex_declaration
BOOL position_transformed;
};
struct wined3d_saved_states
{
uint32_t vs_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_VS_CONSTS_F)];
WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)];
WORD pixelShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
WORD pixelShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
uint32_t transform[WINED3D_BITMAP_SIZE(WINED3D_HIGHEST_TRANSFORM_STATE + 1)];
WORD streamSource; /* WINED3D_MAX_STREAMS, 16 */
WORD streamFreq; /* WINED3D_MAX_STREAMS, 16 */
uint32_t renderState[WINED3D_BITMAP_SIZE(WINEHIGHEST_RENDER_STATE + 1)];
DWORD textureState[WINED3D_MAX_TEXTURES]; /* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */
WORD samplerState[WINED3D_MAX_COMBINED_SAMPLERS]; /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */
DWORD clipplane; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
DWORD indices : 1;
DWORD material : 1;
DWORD viewport : 1;
DWORD vertexDecl : 1;
DWORD pixelShader : 1;
DWORD vertexShader : 1;
DWORD scissorRect : 1;
DWORD store_stream_offset : 1;
DWORD alpha_to_coverage : 1;
DWORD lights : 1;
DWORD transforms : 1;
DWORD padding : 1;
struct list changed_lights;
};
struct StageState {
DWORD stage;
DWORD state;
};
struct wined3d_stateblock
{
LONG ref; /* Note: Ref counting not required */
struct wined3d_device *device;
/* Array indicating whether things have been set or changed */
struct wined3d_saved_states changed;
struct wined3d_stateblock_state stateblock_state;
struct wined3d_light_state light_state;
/* Contained state management */
DWORD contained_render_states[WINEHIGHEST_RENDER_STATE + 1];
unsigned int num_contained_render_states;
DWORD contained_transform_states[WINED3D_HIGHEST_TRANSFORM_STATE + 1];
unsigned int num_contained_transform_states;
struct StageState contained_tss_states[WINED3D_MAX_TEXTURES * (WINED3D_HIGHEST_TEXTURE_STATE + 1)];
unsigned int num_contained_tss_states;
struct StageState contained_sampler_states[WINED3D_MAX_COMBINED_SAMPLERS * WINED3D_HIGHEST_SAMPLER_STATE];
unsigned int num_contained_sampler_states;
};
bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info,
struct wined3d_light_info *light_info, BOOL enable) DECLSPEC_HIDDEN;
struct wined3d_light_info *wined3d_light_state_get_light(const struct wined3d_light_state *state,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment