Module: wine Branch: master Commit: f7deca3ae65f9cc9a3d1ddc399617b4cd852bef1 URL: https://gitlab.winehq.org/wine/wine/-/commit/f7deca3ae65f9cc9a3d1ddc399617b4...
Author: Eric Pouech eric.pouech@gmail.com Date: Tue Nov 22 11:08:51 2022 +0100
wined3d: Use pointer to non long integral type for some helpers.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/wined3d/glsl_shader.c | 8 ++++---- dlls/wined3d/shader.c | 4 ++-- dlls/wined3d/wined3d_private.h | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 40b5442ed04..e9ada251749 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1945,7 +1945,7 @@ static const char *shader_glsl_interpolation_qualifiers(enum wined3d_shader_inte }
static enum wined3d_shader_interpolation_mode wined3d_extract_interpolation_mode( - const DWORD *packed_interpolation_mode, unsigned int register_idx) + const uint32_t *packed_interpolation_mode, unsigned int register_idx) { return wined3d_extract_bits(packed_interpolation_mode, register_idx * WINED3D_PACKED_INTERPOLATION_BIT_COUNT, WINED3D_PACKED_INTERPOLATION_BIT_COUNT); @@ -1953,7 +1953,7 @@ static enum wined3d_shader_interpolation_mode wined3d_extract_interpolation_mode
static void shader_glsl_declare_shader_inputs(const struct wined3d_gl_info *gl_info, struct wined3d_string_buffer *buffer, unsigned int element_count, - const DWORD *interpolation_mode, BOOL unroll) + const uint32_t *interpolation_mode, BOOL unroll) { enum wined3d_shader_interpolation_mode mode; unsigned int i; @@ -1991,7 +1991,7 @@ static BOOL needs_interpolation_qualifiers_for_shader_outputs(const struct wined
static void shader_glsl_declare_shader_outputs(const struct wined3d_gl_info *gl_info, struct wined3d_string_buffer *buffer, unsigned int element_count, BOOL rasterizer_setup, - const DWORD *interpolation_mode) + const uint32_t *interpolation_mode) { enum wined3d_shader_interpolation_mode mode; unsigned int i; @@ -7335,7 +7335,7 @@ static void shader_glsl_generate_stream_output_setup(struct wined3d_string_buffe
static void shader_glsl_generate_sm4_output_setup(struct shader_glsl_priv *priv, const struct wined3d_shader *shader, unsigned int input_count, - const struct wined3d_gl_info *gl_info, BOOL rasterizer_setup, const DWORD *interpolation_mode) + const struct wined3d_gl_info *gl_info, BOOL rasterizer_setup, const uint32_t *interpolation_mode) { const char *prefix = shader_glsl_get_prefix(shader->reg_maps.shader_version.type); struct wined3d_string_buffer *buffer = &priv->shader_buffer; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index c2e77021bb3..91874898025 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -978,7 +978,7 @@ static HRESULT shader_calculate_clip_or_cull_distance_mask( return WINED3D_OK; }
-static void wined3d_insert_interpolation_mode(DWORD *packed_interpolation_mode, +static void wined3d_insert_interpolation_mode(uint32_t *packed_interpolation_mode, unsigned int register_idx, enum wined3d_shader_interpolation_mode mode) { if (mode > WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE) @@ -3516,7 +3516,7 @@ HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *sh return WINED3D_OK; }
-static void init_interpolation_compile_args(DWORD *interpolation_args, +static void init_interpolation_compile_args(uint32_t *interpolation_args, const struct wined3d_shader *pixel_shader, const struct wined3d_d3d_info *d3d_info) { if (!d3d_info->shader_output_interpolation || !pixel_shader diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c460a6b1f8c..cf82bebb972 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1159,7 +1159,7 @@ struct wined3d_shader_reg_maps WORD labels; /* MAX_LABELS, 16 */ DWORD temporary; /* 32 */ unsigned int temporary_count; - DWORD *constf; /* pixel, vertex */ + uint32_t *constf; /* pixel, vertex */ struct list indexable_temps; const struct wined3d_shader_immediate_constant_buffer *icb; union @@ -1557,7 +1557,7 @@ struct vs_compile_args { DWORD swizzle_map; /* MAX_ATTRIBS, 32 */ unsigned int next_shader_input_count; - DWORD interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; + uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; BYTE fog_src; BYTE clip_enabled : 1; BYTE point_size : 1; @@ -1575,14 +1575,14 @@ struct ds_compile_args unsigned int next_shader_type : 3; unsigned int render_offscreen : 1; unsigned int padding : 12; - DWORD interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; + uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; };
struct gs_compile_args { unsigned int output_count; enum wined3d_primitive_type primitive_type; - DWORD interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; + uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; };
struct wined3d_shader_backend_ops @@ -5946,7 +5946,7 @@ struct wined3d_pixel_shader
BOOL force_early_depth_stencil; enum wined3d_shader_register_type depth_output; - DWORD interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; + uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]; };
struct wined3d_compute_shader @@ -6443,7 +6443,7 @@ static inline uint32_t wined3d_mask_from_size(unsigned int size) return size < 32 ? (1u << size) - 1 : ~0u; }
-static inline DWORD wined3d_extract_bits(const DWORD *bitstream, +static inline DWORD wined3d_extract_bits(const uint32_t *bitstream, unsigned int offset, unsigned int count) { const unsigned int word_bit_count = sizeof(*bitstream) * CHAR_BIT; @@ -6463,7 +6463,7 @@ static inline DWORD wined3d_extract_bits(const DWORD *bitstream, return ret; }
-static inline void wined3d_insert_bits(DWORD *bitstream, +static inline void wined3d_insert_bits(uint32_t *bitstream, unsigned int offset, unsigned int count, DWORD bits) { const unsigned int word_bit_count = sizeof(*bitstream) * CHAR_BIT; @@ -6816,7 +6816,7 @@ static inline unsigned int wined3d_bitmap_ffz(const uint32_t *bitmap, unsigned i return wined3d_bitmap_ffs_xor(bitmap, bit_count, start, ~0u); }
-static inline BOOL wined3d_bitmap_get_range(const DWORD *bitmap, unsigned int bit_count, +static inline BOOL wined3d_bitmap_get_range(const uint32_t *bitmap, unsigned int bit_count, unsigned int start, struct wined3d_range *range) { unsigned int range_start, range_end;