From e213d17d4cf7ca2f2e89645358a01b7805a760b9 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Fri, 9 Dec 2022 10:25:27 +0100 Subject: [PATCH] wined3d: Let sampler_states and texture_states be 2D arrays of uint32_t. Signed-off-by: Eric Pouech --- dlls/wined3d/state.c | 4 ++-- dlls/wined3d/stateblock.c | 4 ++-- dlls/wined3d/wined3d_private.h | 6 +++--- include/wine/wined3d.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 3479b407974..557db3c9759 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -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; diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index ad9f29b72f9..d678a6ea2a0 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -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; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e4104d2c61a..449db821249 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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. diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 2e709543127..0070a7dd4c0 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -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];