Commit e213d17d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

wined3d: Let sampler_states and texture_states be 2D arrays of uint32_t.

parent 0ddce752
......@@ -3696,7 +3696,7 @@ static enum wined3d_texture_address wined3d_texture_gl_address_mode(const struct
}
static void wined3d_sampler_desc_from_sampler_states(struct wined3d_sampler_desc *desc,
const struct wined3d_context_gl *context_gl, const DWORD *sampler_states,
const struct wined3d_context_gl *context_gl, const uint32_t *sampler_states,
const struct wined3d_texture_gl *texture_gl)
{
union
......@@ -3777,7 +3777,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
if (state->textures[sampler_idx])
{
struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(state->textures[sampler_idx]);
const DWORD *sampler_states = state->sampler_states[sampler_idx];
const uint32_t *sampler_states = state->sampler_states[sampler_idx];
struct wined3d_device *device = context->device;
BOOL srgb = is_srgb_enabled(sampler_states);
struct wined3d_sampler_desc desc;
......
......@@ -1782,7 +1782,7 @@ static void init_default_render_states(unsigned int rs[WINEHIGHEST_RENDER_STATE
rs[WINED3D_RS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
}
static void init_default_texture_state(unsigned int i, DWORD stage[WINED3D_HIGHEST_TEXTURE_STATE + 1])
static void init_default_texture_state(unsigned int i, uint32_t stage[WINED3D_HIGHEST_TEXTURE_STATE + 1])
{
stage[WINED3D_TSS_COLOR_OP] = i ? WINED3D_TOP_DISABLE : WINED3D_TOP_MODULATE;
stage[WINED3D_TSS_COLOR_ARG1] = WINED3DTA_TEXTURE;
......@@ -1803,7 +1803,7 @@ static void init_default_texture_state(unsigned int i, DWORD stage[WINED3D_HIGHE
stage[WINED3D_TSS_RESULT_ARG] = WINED3DTA_CURRENT;
}
static void init_default_sampler_states(DWORD states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1])
static void init_default_sampler_states(uint32_t states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1])
{
unsigned int i;
......
......@@ -3897,8 +3897,8 @@ struct wined3d_state
BOOL ps_consts_b[WINED3D_MAX_CONSTS_B];
struct wined3d_texture *textures[WINED3D_MAX_COMBINED_SAMPLERS];
DWORD sampler_states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
DWORD texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
uint32_t sampler_states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
uint32_t texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
struct wined3d_matrix transforms[WINED3D_HIGHEST_TRANSFORM_STATE + 1];
struct wined3d_vec4 clip_planes[WINED3D_MAX_CLIP_DISTANCES];
......@@ -6365,7 +6365,7 @@ static inline void context_apply_state(struct wined3d_context *context,
state_table[rep].apply(context, state, rep);
}
static inline BOOL is_srgb_enabled(const DWORD *sampler_states)
static inline BOOL is_srgb_enabled(const uint32_t *sampler_states)
{
/* Only use the LSB of the WINED3D_SAMP_SRGB_TEXTURE value. This matches
* the behaviour of the AMD Windows driver.
......
......@@ -2173,8 +2173,8 @@ struct wined3d_stateblock_state
BOOL alpha_to_coverage;
struct wined3d_texture *textures[WINED3D_MAX_COMBINED_SAMPLERS];
DWORD sampler_states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
DWORD texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
uint32_t sampler_states[WINED3D_MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
uint32_t texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
struct wined3d_matrix transforms[WINED3D_HIGHEST_TRANSFORM_STATE + 1];
struct wined3d_vec4 clip_planes[WINED3D_MAX_CLIP_DISTANCES];
......
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