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
e213d17d
Commit
e213d17d
authored
Dec 09, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Let sampler_states and texture_states be 2D arrays of uint32_t.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
0ddce752
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
state.c
dlls/wined3d/state.c
+2
-2
stateblock.c
dlls/wined3d/stateblock.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
wined3d.h
include/wine/wined3d.h
+2
-2
No files found.
dlls/wined3d/state.c
View file @
e213d17d
...
...
@@ -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
;
...
...
dlls/wined3d/stateblock.c
View file @
e213d17d
...
...
@@ -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
;
...
...
dlls/wined3d/wined3d_private.h
View file @
e213d17d
...
...
@@ -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.
...
...
include/wine/wined3d.h
View file @
e213d17d
...
...
@@ -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
];
...
...
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