Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9b1ce2d8
Commit
9b1ce2d8
authored
Dec 07, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reduce usage of long integral types in glsl_shader.c.
parent
b36eab11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
26 deletions
+27
-26
glsl_shader.c
dlls/wined3d/glsl_shader.c
+23
-22
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-4
No files found.
dlls/wined3d/glsl_shader.c
View file @
9b1ce2d8
...
...
@@ -680,7 +680,7 @@ static void shader_glsl_init_uniform_block_bindings(const struct wined3d_gl_info
/* Context activation is done by the caller. */
static
void
shader_glsl_load_samplers_range
(
const
struct
wined3d_gl_info
*
gl_info
,
struct
shader_glsl_priv
*
priv
,
GLuint
program_id
,
const
char
*
prefix
,
unsigned
int
base
,
unsigned
int
count
,
const
DWORD
*
tex_unit_map
)
unsigned
int
base
,
unsigned
int
count
,
const
unsigned
int
*
tex_unit_map
)
{
struct
wined3d_string_buffer
*
sampler_name
=
string_buffer_get
(
&
priv
->
string_buffers
);
unsigned
int
i
,
mapped_unit
;
...
...
@@ -2730,7 +2730,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
/* pixel shaders >= 3.0 */
if
(
version
->
major
>=
3
)
{
DWORD
idx
=
shader
->
u
.
ps
.
input_reg_map
[
reg
->
idx
[
0
].
offset
];
unsigned
int
idx
=
shader
->
u
.
ps
.
input_reg_map
[
reg
->
idx
[
0
].
offset
];
unsigned
int
in_count
=
vec4_varyings
(
version
->
major
,
gl_info
);
if
(
reg
->
idx
[
0
].
rel_addr
)
...
...
@@ -3456,7 +3456,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
if
(
flags
&
WINED3D_GLSL_SAMPLE_LOAD
)
{
static
const
DWORD
texel_fetch_flags
=
WINED3D_GLSL_SAMPLE_LOAD
|
WINED3D_GLSL_SAMPLE_OFFSET
;
static
const
uint32_t
texel_fetch_flags
=
WINED3D_GLSL_SAMPLE_LOAD
|
WINED3D_GLSL_SAMPLE_OFFSET
;
if
(
flags
&
~
texel_fetch_flags
)
ERR
(
"Unexpected flags %#x for texelFetch.
\n
"
,
flags
&
~
texel_fetch_flags
);
...
...
@@ -5142,7 +5142,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
ins
->
ctx
->
reg_maps
->
shader_version
.
minor
);
struct
glsl_sample_function
sample_function
;
DWORD
sample_flags
=
0
;
DWORD
resource_idx
;
unsigned
int
resource_idx
;
DWORD
mask
=
0
,
swizzle
;
const
struct
shader_glsl_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
enum
wined3d_shader_resource_type
resource_type
;
...
...
@@ -6260,7 +6260,7 @@ static void shader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
else
{
enum
wined3d_shader_src_modifier
src_mod
=
ins
->
src
[
0
].
modifiers
;
DWORD
reg
=
ins
->
src
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
src
[
0
].
reg
.
idx
[
0
].
offset
;
char
dst_swizzle
[
6
];
shader_glsl_get_swizzle
(
&
ins
->
src
[
0
],
FALSE
,
write_mask
,
dst_swizzle
);
...
...
@@ -6291,7 +6291,7 @@ static void shader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_texdp3tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
sampler_idx
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_sample_function
sample_function
;
struct
glsl_src_param
src0_param
;
UINT
mask_size
;
...
...
@@ -6335,7 +6335,7 @@ static void shader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_texdp3
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
dstreg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
dstreg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
DWORD
dst_mask
;
unsigned
int
mask_size
;
...
...
@@ -6377,7 +6377,7 @@ static void shader_glsl_texdepth(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_texm3x2depth
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
dstreg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
dstreg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -6391,7 +6391,7 @@ static void shader_glsl_texm3x2depth(const struct wined3d_shader_instruction *in
static
void
shader_glsl_texm3x2pad
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
struct
glsl_src_param
src0_param
;
...
...
@@ -6406,7 +6406,7 @@ static void shader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins)
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -6419,7 +6419,7 @@ static void shader_glsl_texm3x2tex(const struct wined3d_shader_instruction *ins)
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
wined3d_string_buffer
*
buffer
=
ins
->
ctx
->
buffer
;
struct
glsl_sample_function
sample_function
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -6439,7 +6439,7 @@ static void shader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins)
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
struct
glsl_sample_function
sample_function
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -6461,7 +6461,7 @@ static void shader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
char
dst_mask
[
6
];
...
...
@@ -6484,7 +6484,7 @@ static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
glsl_sample_function
sample_function
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
char
coord_mask
[
6
];
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -6515,7 +6515,7 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in
struct
wined3d_shader_tex_mx
*
tex_mx
=
ins
->
ctx
->
tex_mx
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
struct
glsl_sample_function
sample_function
;
DWORD
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
reg
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
;
char
coord_mask
[
6
];
...
...
@@ -6550,7 +6550,7 @@ static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins)
const
struct
shader_glsl_ctx_priv
*
priv
=
ins
->
ctx
->
backend_data
;
struct
glsl_sample_function
sample_function
;
struct
glsl_src_param
coord_param
;
DWORD
sampler_idx
;
unsigned
int
sampler_idx
;
DWORD
mask
;
DWORD
flags
;
char
coord_mask
[
6
];
...
...
@@ -6614,7 +6614,7 @@ static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins)
static
void
shader_glsl_bem
(
const
struct
wined3d_shader_instruction
*
ins
)
{
DWORD
sampler_idx
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
unsigned
int
sampler_idx
=
ins
->
dst
[
0
].
reg
.
idx
[
0
].
offset
;
struct
glsl_src_param
src0_param
,
src1_param
;
shader_glsl_add_src_param
(
ins
,
&
ins
->
src
[
0
],
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
,
&
src0_param
);
...
...
@@ -6891,7 +6891,7 @@ static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const struc
}
static
void
shader_glsl_setup_vs3_output
(
struct
shader_glsl_priv
*
priv
,
const
struct
wined3d_gl_info
*
gl_info
,
const
DWORD
*
map
,
const
struct
wined3d_gl_info
*
gl_info
,
const
unsigned
int
*
map
,
const
struct
wined3d_shader_signature
*
input_signature
,
const
struct
wined3d_shader_reg_maps
*
reg_maps_in
,
const
struct
wined3d_shader_signature
*
output_signature
,
...
...
@@ -6902,7 +6902,8 @@ static void shader_glsl_setup_vs3_output(struct shader_glsl_priv *priv,
struct
wined3d_string_buffer
*
buffer
=
&
priv
->
shader_buffer
;
unsigned
int
in_count
=
vec4_varyings
(
3
,
gl_info
);
unsigned
int
max_varyings
=
needs_legacy_glsl_syntax
(
gl_info
)
?
in_count
+
2
:
in_count
;
DWORD
in_idx
,
*
set
=
NULL
;
unsigned
int
in_idx
;
DWORD
*
set
=
NULL
;
unsigned
int
i
,
j
;
char
reg_mask
[
6
];
...
...
@@ -7047,7 +7048,7 @@ static void shader_glsl_generate_clip_or_cull_distances(struct wined3d_string_bu
}
static
void
shader_glsl_setup_sm3_rasterizer_input
(
struct
shader_glsl_priv
*
priv
,
const
struct
wined3d_gl_info
*
gl_info
,
const
DWORD
*
map
,
const
struct
wined3d_gl_info
*
gl_info
,
const
unsigned
int
*
map
,
const
struct
wined3d_shader_signature
*
input_signature
,
const
struct
wined3d_shader_reg_maps
*
reg_maps_in
,
unsigned
int
input_count
,
const
struct
wined3d_shader_signature
*
output_signature
,
...
...
@@ -9251,7 +9252,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
}
static
const
char
*
shader_glsl_get_ffp_fragment_op_arg
(
struct
wined3d_string_buffer
*
buffer
,
DWORD
argnum
,
unsigned
int
stage
,
DWORD
arg
)
unsigned
int
argnum
,
unsigned
int
stage
,
DWORD
arg
)
{
const
char
*
ret
;
...
...
@@ -9344,7 +9345,7 @@ static const char *shader_glsl_get_ffp_fragment_op_arg(struct wined3d_string_buf
}
static
void
shader_glsl_ffp_fragment_op
(
struct
wined3d_string_buffer
*
buffer
,
unsigned
int
stage
,
BOOL
color
,
BOOL
alpha
,
BOOL
tmp_dst
,
DWORD
op
,
DWORD
dw_arg0
,
DWORD
dw_arg1
,
DWORD
dw_arg2
)
BOOL
alpha
,
BOOL
tmp_dst
,
unsigned
int
op
,
DWORD
dw_arg0
,
DWORD
dw_arg1
,
DWORD
dw_arg2
)
{
const
char
*
dstmask
,
*
dstreg
,
*
arg0
,
*
arg1
,
*
arg2
;
...
...
dlls/wined3d/wined3d_private.h
View file @
9b1ce2d8
...
...
@@ -1224,7 +1224,7 @@ struct wined3d_shader_reg_maps
struct
wined3d_shader_tex_mx
{
unsigned
int
current_row
;
DWORD
texcoord_w
[
2
];
unsigned
int
texcoord_w
[
2
];
};
struct
wined3d_shader_parser_state
...
...
@@ -1258,7 +1258,7 @@ struct wined3d_shader_register
enum
wined3d_immconst_type
immconst_type
;
union
{
DWORD
immconst_data
[
4
];
unsigned
int
immconst_data
[
4
];
unsigned
fp_body_idx
;
}
u
;
};
...
...
@@ -3775,7 +3775,7 @@ struct wined3d_ffp_vs_settings
DWORD
swizzle_map
;
/* MAX_ATTRIBS, 32 */
DWORD
texgen
[
WINED3D_MAX_TEXTURES
];
unsigned
int
texgen
[
WINED3D_MAX_TEXTURES
];
};
struct
wined3d_ffp_vs_desc
...
...
@@ -5931,7 +5931,7 @@ struct wined3d_geometry_shader
struct
wined3d_pixel_shader
{
/* Pixel shader input semantics */
DWORD
input_reg_map
[
MAX_REG_INPUT
];
unsigned
int
input_reg_map
[
MAX_REG_INPUT
];
DWORD
input_reg_used
;
/* MAX_REG_INPUT, 32 */
unsigned
int
declared_in_count
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment