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
215a32d6
Commit
215a32d6
authored
Aug 10, 2023
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make wined3d_swapchain_desc in wined3d_swapchain_create const.
parent
eba2523a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
28 deletions
+24
-28
adapter_gl.c
dlls/wined3d/adapter_gl.c
+1
-1
adapter_vk.c
dlls/wined3d/adapter_vk.c
+1
-1
directx.c
dlls/wined3d/directx.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+16
-20
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
wined3d_vk.h
dlls/wined3d/wined3d_vk.h
+1
-1
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/wined3d/adapter_gl.c
View file @
215a32d6
...
...
@@ -4688,7 +4688,7 @@ static void adapter_gl_destroy_bo(struct wined3d_context *context, struct wined3
}
static
HRESULT
adapter_gl_create_swapchain
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
)
{
struct
wined3d_swapchain_gl
*
swapchain_gl
;
...
...
dlls/wined3d/adapter_vk.c
View file @
215a32d6
...
...
@@ -1231,7 +1231,7 @@ static void adapter_vk_destroy_bo(struct wined3d_context *context, struct wined3
}
static
HRESULT
adapter_vk_create_swapchain
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
)
{
struct
wined3d_swapchain_vk
*
swapchain_vk
;
...
...
dlls/wined3d/directx.c
View file @
215a32d6
...
...
@@ -3019,7 +3019,7 @@ static void adapter_no3d_destroy_bo(struct wined3d_context *context, struct wine
}
static
HRESULT
adapter_no3d_create_swapchain
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
)
{
struct
wined3d_swapchain
*
swapchain_no3d
;
...
...
dlls/wined3d/swapchain.c
View file @
215a32d6
...
...
@@ -1420,6 +1420,7 @@ static HRESULT wined3d_swapchain_state_init(struct wined3d_swapchain_state *stat
GetWindowRect
(
window
,
&
state
->
original_window_rect
);
state
->
wined3d
=
wined3d
;
state
->
device_window
=
window
;
state
->
desc
.
device_window
=
window
;
state
->
parent
=
parent
;
if
(
desc
->
flags
&
WINED3D_SWAPCHAIN_REGISTER_STATE
)
...
...
@@ -1479,7 +1480,7 @@ static HRESULT swapchain_create_texture(struct wined3d_swapchain *swapchain,
}
static
HRESULT
wined3d_swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_swapchain_ops
*
swapchain_ops
)
{
...
...
@@ -1503,12 +1504,8 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
&&
desc
->
swap_effect
!=
WINED3D_SWAP_EFFECT_COPY
)
FIXME
(
"Unimplemented swap effect %#x.
\n
"
,
desc
->
swap_effect
);
if
(
!
desc
->
device_window
)
{
TRACE
(
"Updating device_window to %p.
\n
"
,
device
->
create_parms
.
focus_window
);
desc
->
device_window
=
device
->
create_parms
.
focus_window
;
}
window
=
desc
->
device_window
;
window
=
desc
->
device_window
?
desc
->
device_window
:
device
->
create_parms
.
focus_window
;
TRACE
(
"Using target window %p.
\n
"
,
window
);
if
(
FAILED
(
hr
=
wined3d_swapchain_state_init
(
&
swapchain
->
state
,
desc
,
window
,
device
->
wined3d
,
state_parent
)))
{
...
...
@@ -1527,24 +1524,24 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
swapchain_set_max_frame_latency
(
swapchain
,
device
);
GetClientRect
(
window
,
&
client_rect
);
if
(
desc
->
windowed
)
if
(
swapchain
->
state
.
desc
.
windowed
)
{
TRACE
(
"Client rect %s.
\n
"
,
wine_dbgstr_rect
(
&
client_rect
));
if
(
!
desc
->
backbuffer_width
)
if
(
!
swapchain
->
state
.
desc
.
backbuffer_width
)
{
desc
->
backbuffer_width
=
client_rect
.
right
?
client_rect
.
right
:
8
;
TRACE
(
"Updating width to %u.
\n
"
,
desc
->
backbuffer_width
);
swapchain
->
state
.
desc
.
backbuffer_width
=
client_rect
.
right
?
client_rect
.
right
:
8
;
TRACE
(
"Updating width to %u.
\n
"
,
swapchain
->
state
.
desc
.
backbuffer_width
);
}
if
(
!
desc
->
backbuffer_height
)
{
desc
->
backbuffer_height
=
client_rect
.
bottom
?
client_rect
.
bottom
:
8
;
TRACE
(
"Updating height to %u.
\n
"
,
desc
->
backbuffer_height
);
swapchain
->
state
.
desc
.
backbuffer_height
=
client_rect
.
bottom
?
client_rect
.
bottom
:
8
;
TRACE
(
"Updating height to %u.
\n
"
,
swapchain
->
state
.
desc
.
backbuffer_height
);
}
if
(
desc
->
backbuffer_format
==
WINED3DFMT_UNKNOWN
)
if
(
swapchain
->
state
.
desc
.
backbuffer_format
==
WINED3DFMT_UNKNOWN
)
{
desc
->
backbuffer_format
=
swapchain
->
state
.
original_mode
.
format_id
;
swapchain
->
state
.
desc
.
backbuffer_format
=
swapchain
->
state
.
original_mode
.
format_id
;
TRACE
(
"Updating format to %s.
\n
"
,
debug_d3dformat
(
swapchain
->
state
.
original_mode
.
format_id
));
}
}
...
...
@@ -1560,7 +1557,6 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
output_desc
.
desktop_rect
.
left
,
output_desc
.
desktop_rect
.
top
,
desc
->
backbuffer_width
,
desc
->
backbuffer_height
);
}
swapchain
->
state
.
desc
=
*
desc
;
wined3d_swapchain_apply_sample_count_override
(
swapchain
,
swapchain
->
state
.
desc
.
backbuffer_format
,
&
swapchain
->
state
.
desc
.
multisample_type
,
&
swapchain
->
state
.
desc
.
multisample_quality
);
...
...
@@ -1686,7 +1682,7 @@ err:
}
HRESULT
wined3d_swapchain_no3d_init
(
struct
wined3d_swapchain
*
swapchain_no3d
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
TRACE
(
"swapchain_no3d %p, device %p, desc %p, state_parent %p, parent %p, parent_ops %p.
\n
"
,
...
...
@@ -1697,7 +1693,7 @@ HRESULT wined3d_swapchain_no3d_init(struct wined3d_swapchain *swapchain_no3d, st
}
HRESULT
wined3d_swapchain_gl_init
(
struct
wined3d_swapchain_gl
*
swapchain_gl
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
TRACE
(
"swapchain_gl %p, device %p, desc %p, state_parent %p, parent %p, parent_ops %p.
\n
"
,
...
...
@@ -1708,7 +1704,7 @@ HRESULT wined3d_swapchain_gl_init(struct wined3d_swapchain_gl *swapchain_gl, str
}
HRESULT
wined3d_swapchain_vk_init
(
struct
wined3d_swapchain_vk
*
swapchain_vk
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
HRESULT
hr
;
...
...
@@ -1733,7 +1729,7 @@ HRESULT wined3d_swapchain_vk_init(struct wined3d_swapchain_vk *swapchain_vk, str
}
HRESULT
CDECL
wined3d_swapchain_create
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
215a32d6
...
...
@@ -2561,7 +2561,7 @@ struct wined3d_adapter_ops
unsigned
int
sub_resource_idx
,
struct
wined3d_bo_address
*
addr
);
void
(
*
adapter_destroy_bo
)(
struct
wined3d_context
*
context
,
struct
wined3d_bo
*
bo
);
HRESULT
(
*
adapter_create_swapchain
)(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
);
void
(
*
adapter_destroy_swapchain
)(
struct
wined3d_swapchain
*
swapchain
);
...
...
@@ -4315,7 +4315,7 @@ void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain,
const
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_swapchain_no3d_init
(
struct
wined3d_swapchain
*
swapchain_no3d
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
@@ -4332,7 +4332,7 @@ static inline struct wined3d_swapchain_gl *wined3d_swapchain_gl(struct wined3d_s
void
wined3d_swapchain_gl_cleanup
(
struct
wined3d_swapchain_gl
*
swapchain_gl
)
DECLSPEC_HIDDEN
;
struct
wined3d_context_gl
*
wined3d_swapchain_gl_get_context
(
struct
wined3d_swapchain_gl
*
swapchain_gl
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_swapchain_gl_init
(
struct
wined3d_swapchain_gl
*
swapchain_gl
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
dlls/wined3d/wined3d_vk.h
View file @
215a32d6
...
...
@@ -1035,7 +1035,7 @@ static inline struct wined3d_swapchain_vk *wined3d_swapchain_vk(struct wined3d_s
void
wined3d_swapchain_vk_cleanup
(
struct
wined3d_swapchain_vk
*
swapchain_vk
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_swapchain_vk_init
(
struct
wined3d_swapchain_vk
*
swapchain_vk
,
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
215a32d6
...
...
@@ -2819,7 +2819,7 @@ HRESULT __cdecl wined3d_streaming_buffer_upload(struct wined3d_device *device, s
const
void
*
data
,
unsigned
int
size
,
unsigned
int
stride
,
unsigned
int
*
pos
);
HRESULT
__cdecl
wined3d_swapchain_create
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
const
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
);
ULONG
__cdecl
wined3d_swapchain_decref
(
struct
wined3d_swapchain
*
swapchain
);
...
...
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