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
ef2ad5ef
Commit
ef2ad5ef
authored
Mar 20, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the "wined3d_caps" field of struct fragment_caps as separate bool flags.
parent
efb0d67a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
22 deletions
+23
-22
adapter_gl.c
dlls/wined3d/adapter_gl.c
+1
-1
adapter_vk.c
dlls/wined3d/adapter_vk.c
+1
-1
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+5
-4
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+2
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+5
-4
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+2
-1
shader.c
dlls/wined3d/shader.c
+1
-1
shader_spirv.c
dlls/wined3d/shader_spirv.c
+1
-1
state.c
dlls/wined3d/state.c
+1
-1
utils.c
dlls/wined3d/utils.c
+1
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-5
No files found.
dlls/wined3d/adapter_gl.c
View file @
ef2ad5ef
...
...
@@ -5211,7 +5211,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
d3d_info
->
ffp_generic_attributes
=
vertex_caps
.
ffp_generic_attributes
;
d3d_info
->
ffp_alpha_test
=
!!
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
];
d3d_info
->
vs_clipping
=
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_VS_CLIPPING
;
d3d_info
->
shader_color_key
=
!!
(
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_COLOR_KEY
)
;
d3d_info
->
shader_color_key
=
fragment_caps
.
color_key
;
d3d_info
->
shader_double_precision
=
!!
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_DOUBLE_PRECISION
);
d3d_info
->
shader_output_interpolation
=
!!
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION
);
d3d_info
->
frag_coord_correction
=
!!
gl_info
->
supported
[
ARB_FRAGMENT_COORD_CONVENTIONS
];
...
...
dlls/wined3d/adapter_vk.c
View file @
ef2ad5ef
...
...
@@ -2341,7 +2341,7 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_
d3d_info
->
ffp_generic_attributes
=
vertex_caps
.
ffp_generic_attributes
;
d3d_info
->
ffp_alpha_test
=
false
;
d3d_info
->
vs_clipping
=
!!
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_VS_CLIPPING
);
d3d_info
->
shader_color_key
=
!!
(
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_COLOR_KEY
)
;
d3d_info
->
shader_color_key
=
fragment_caps
.
color_key
;
d3d_info
->
shader_double_precision
=
!!
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_DOUBLE_PRECISION
);
d3d_info
->
shader_output_interpolation
=
!!
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION
);
d3d_info
->
viewport_array_index_any_shader
=
false
;
/* VK_EXT_shader_viewport_index_layer */
...
...
dlls/wined3d/arb_program_shader.c
View file @
ef2ad5ef
...
...
@@ -4824,7 +4824,7 @@ static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wine
priv
->
vertex_pipe
=
vertex_pipe
;
priv
->
fragment_pipe
=
fragment_pipe
;
fragment_pipe
->
get_caps
(
device
->
adapter
,
&
fragment_caps
);
priv
->
ffp_proj_control
=
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
;
priv
->
ffp_proj_control
=
fragment_caps
.
proj_control
;
device
->
vertex_priv
=
vertex_priv
;
device
->
fragment_priv
=
fragment_priv
;
...
...
@@ -5763,9 +5763,10 @@ static void arbfp_get_caps(const struct wined3d_adapter *adapter, struct fragmen
{
const
struct
wined3d_gl_info
*
gl_info
=
&
wined3d_adapter_gl_const
(
adapter
)
->
gl_info
;
caps
->
wined3d_caps
=
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
|
WINED3D_FRAGMENT_CAP_SRGB_WRITE
|
WINED3D_FRAGMENT_CAP_COLOR_KEY
;
memset
(
caps
,
0
,
sizeof
(
*
caps
));
caps
->
proj_control
=
true
;
caps
->
srgb_write
=
true
;
caps
->
color_key
=
true
;
caps
->
PrimitiveMiscCaps
=
WINED3DPMISCCAPS_TSSARGTEMP
;
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_DISABLE
|
WINED3DTEXOPCAPS_SELECTARG1
|
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
ef2ad5ef
...
...
@@ -1269,7 +1269,8 @@ static void atifs_enable(const struct wined3d_context *context, BOOL enable)
static
void
atifs_get_caps
(
const
struct
wined3d_adapter
*
adapter
,
struct
fragment_caps
*
caps
)
{
caps
->
wined3d_caps
=
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
;
memset
(
caps
,
0
,
sizeof
(
*
caps
));
caps
->
proj_control
=
true
;
caps
->
PrimitiveMiscCaps
=
WINED3DPMISCCAPS_TSSARGTEMP
|
WINED3DPMISCCAPS_PERSTAGECONSTANT
;
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_DISABLE
|
...
...
dlls/wined3d/glsl_shader.c
View file @
ef2ad5ef
...
...
@@ -11102,7 +11102,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
priv
->
vertex_pipe
=
vertex_pipe
;
priv
->
fragment_pipe
=
fragment_pipe
;
fragment_pipe
->
get_caps
(
device
->
adapter
,
&
fragment_caps
);
priv
->
ffp_proj_control
=
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
;
priv
->
ffp_proj_control
=
fragment_caps
.
proj_control
;
priv
->
legacy_lighting
=
device
->
wined3d
->
flags
&
WINED3D_LEGACY_FFP_LIGHTING
;
device
->
vertex_priv
=
vertex_priv
;
...
...
@@ -12050,9 +12050,10 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s
{
const
struct
wined3d_gl_info
*
gl_info
=
&
wined3d_adapter_gl_const
(
adapter
)
->
gl_info
;
caps
->
wined3d_caps
=
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
|
WINED3D_FRAGMENT_CAP_SRGB_WRITE
|
WINED3D_FRAGMENT_CAP_COLOR_KEY
;
memset
(
caps
,
0
,
sizeof
(
*
caps
));
caps
->
proj_control
=
true
;
caps
->
srgb_write
=
true
;
caps
->
color_key
=
true
;
caps
->
PrimitiveMiscCaps
=
WINED3DPMISCCAPS_TSSARGTEMP
|
WINED3DPMISCCAPS_PERSTAGECONSTANT
;
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_DISABLE
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
ef2ad5ef
...
...
@@ -697,7 +697,8 @@ static void nvrc_fragment_get_caps(const struct wined3d_adapter *adapter, struct
{
const
struct
wined3d_gl_info
*
gl_info
=
&
wined3d_adapter_gl_const
(
adapter
)
->
gl_info
;
caps
->
wined3d_caps
=
0
;
memset
(
caps
,
0
,
sizeof
(
*
caps
));
caps
->
PrimitiveMiscCaps
=
WINED3DPMISCCAPS_TSSARGTEMP
;
/* The caps below can be supported but aren't handled yet in utils.c
...
...
dlls/wined3d/shader.c
View file @
ef2ad5ef
...
...
@@ -1990,7 +1990,7 @@ static HRESULT shader_none_alloc(struct wined3d_device *device, const struct win
priv
->
vertex_pipe
=
vertex_pipe
;
priv
->
fragment_pipe
=
fragment_pipe
;
fragment_pipe
->
get_caps
(
device
->
adapter
,
&
fragment_caps
);
priv
->
ffp_proj_control
=
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
;
priv
->
ffp_proj_control
=
fragment_caps
.
proj_control
;
device
->
vertex_priv
=
vertex_priv
;
device
->
fragment_priv
=
fragment_priv
;
...
...
dlls/wined3d/shader_spirv.c
View file @
ef2ad5ef
...
...
@@ -993,7 +993,7 @@ static HRESULT shader_spirv_alloc(struct wined3d_device *device,
priv
->
vertex_pipe
=
vertex_pipe
;
priv
->
fragment_pipe
=
fragment_pipe
;
fragment_pipe
->
get_caps
(
device
->
adapter
,
&
fragment_caps
);
priv
->
ffp_proj_control
=
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_PROJ_CONTROL
;
priv
->
ffp_proj_control
=
fragment_caps
.
proj_control
;
memset
(
&
priv
->
bindings
,
0
,
sizeof
(
priv
->
bindings
));
device
->
vertex_priv
=
vertex_priv
;
...
...
dlls/wined3d/state.c
View file @
ef2ad5ef
...
...
@@ -5150,7 +5150,7 @@ static void ffp_fragment_get_caps(const struct wined3d_adapter *adapter, struct
{
const
struct
wined3d_gl_info
*
gl_info
=
&
wined3d_adapter_gl_const
(
adapter
)
->
gl_info
;
caps
->
wined3d_caps
=
0
;
memset
(
caps
,
0
,
sizeof
(
*
caps
))
;
caps
->
PrimitiveMiscCaps
=
0
;
caps
->
TextureOpCaps
=
WINED3DTEXOPCAPS_ADD
|
WINED3DTEXOPCAPS_ADDSIGNED
...
...
dlls/wined3d/utils.c
View file @
ef2ad5ef
...
...
@@ -3193,8 +3193,7 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
adapter
->
fragment_pipe
->
get_caps
(
adapter
,
&
fragment_caps
);
adapter
->
shader_backend
->
shader_get_caps
(
adapter
,
&
shader_caps
);
srgb_write
=
(
fragment_caps
.
wined3d_caps
&
WINED3D_FRAGMENT_CAP_SRGB_WRITE
)
&&
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_SRGB_WRITE
);
srgb_write
=
fragment_caps
.
srgb_write
&&
(
shader_caps
.
wined3d_caps
&
WINED3D_SHADER_CAP_SRGB_WRITE
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
format_texture_info
);
++
i
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
ef2ad5ef
...
...
@@ -1988,17 +1988,15 @@ struct wined3d_state_entry_template
unsigned
int
extension
;
};
#define WINED3D_FRAGMENT_CAP_PROJ_CONTROL 0x00000001
#define WINED3D_FRAGMENT_CAP_SRGB_WRITE 0x00000002
#define WINED3D_FRAGMENT_CAP_COLOR_KEY 0x00000004
struct
fragment_caps
{
DWORD
wined3d_caps
;
DWORD
PrimitiveMiscCaps
;
DWORD
TextureOpCaps
;
unsigned
int
max_blend_stages
;
unsigned
int
max_textures
;
bool
proj_control
;
bool
srgb_write
;
bool
color_key
;
};
#define GL_EXT_EMUL_ARB_MULTITEXTURE 0x00000001
...
...
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