Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fbc8f596
Commit
fbc8f596
authored
Aug 06, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Introduce a helper function to convert dxgi multisample info to wined3d.
parent
7f29d994
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
device.c
dlls/dxgi/device.c
+2
-2
dxgi_private.h
dlls/dxgi/dxgi_private.h
+2
-0
factory.c
dlls/dxgi/factory.c
+2
-10
utils.c
dlls/dxgi/utils.c
+15
-0
No files found.
dlls/dxgi/device.c
View file @
fbc8f596
...
...
@@ -185,8 +185,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
surface_desc
.
resource_type
=
WINED3D_RTYPE_SURFACE
;
surface_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
surface_desc
.
multisample_type
=
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
;
surface_desc
.
multisample_quality
=
desc
->
SampleDesc
.
Quality
;
wined3d_sample_desc_from_dxgi
(
&
surface_desc
.
multisample_type
,
&
surface_desc
.
multisample_quality
,
&
desc
->
SampleDesc
)
;
surface_desc
.
usage
=
usage
;
surface_desc
.
pool
=
WINED3D_POOL_DEFAULT
;
surface_desc
.
width
=
desc
->
Width
;
...
...
dlls/dxgi/dxgi_private.h
View file @
fbc8f596
...
...
@@ -76,6 +76,8 @@ const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
DXGI_FORMAT
dxgi_format_from_wined3dformat
(
enum
wined3d_format_id
format
)
DECLSPEC_HIDDEN
;
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
void
wined3d_sample_desc_from_dxgi
(
enum
wined3d_multisample_type
*
wined3d_type
,
unsigned
int
*
wined3d_quality
,
const
DXGI_SAMPLE_DESC
*
dxgi_desc
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_get_private_data
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_set_private_data
(
struct
wined3d_private_store
*
store
,
...
...
dlls/dxgi/factory.c
View file @
fbc8f596
...
...
@@ -211,16 +211,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory1 *ifa
wined3d_desc
.
backbuffer_height
=
desc
->
BufferDesc
.
Height
;
wined3d_desc
.
backbuffer_format
=
wined3dformat_from_dxgi_format
(
desc
->
BufferDesc
.
Format
);
wined3d_desc
.
backbuffer_count
=
desc
->
BufferCount
;
if
(
desc
->
SampleDesc
.
Count
>
1
)
{
wined3d_desc
.
multisample_type
=
desc
->
SampleDesc
.
Count
;
wined3d_desc
.
multisample_quality
=
desc
->
SampleDesc
.
Quality
;
}
else
{
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
}
wined3d_sample_desc_from_dxgi
(
&
wined3d_desc
.
multisample_type
,
&
wined3d_desc
.
multisample_quality
,
&
desc
->
SampleDesc
);
wined3d_desc
.
swap_effect
=
WINED3D_SWAP_EFFECT_DISCARD
;
wined3d_desc
.
device_window
=
desc
->
OutputWindow
;
wined3d_desc
.
windowed
=
desc
->
Windowed
;
...
...
dlls/dxgi/utils.c
View file @
fbc8f596
...
...
@@ -325,6 +325,21 @@ enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
}
}
void
wined3d_sample_desc_from_dxgi
(
enum
wined3d_multisample_type
*
wined3d_type
,
unsigned
int
*
wined3d_quality
,
const
DXGI_SAMPLE_DESC
*
dxgi_desc
)
{
if
(
dxgi_desc
->
Count
>
1
)
{
*
wined3d_type
=
dxgi_desc
->
Count
;
*
wined3d_quality
=
dxgi_desc
->
Quality
;
}
else
{
*
wined3d_type
=
WINED3D_MULTISAMPLE_NONE
;
*
wined3d_quality
=
0
;
}
}
HRESULT
dxgi_get_private_data
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
...
...
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