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
ec3d2ba3
Commit
ec3d2ba3
authored
Apr 30, 2010
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fall back to other depth stencil formats if D24S8 isn't supported.
parent
e7066a90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
swapchain.c
dlls/wined3d/swapchain.c
+22
-5
No files found.
dlls/wined3d/swapchain.c
View file @
ec3d2ba3
...
...
@@ -802,6 +802,15 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
if
(
surface_type
==
SURFACE_OPENGL
)
{
WINED3DFORMAT
formats
[]
=
{
WINED3DFMT_D24_UNORM_S8_UINT
,
WINED3DFMT_D32_UNORM
,
WINED3DFMT_R24_UNORM_X8_TYPELESS
,
WINED3DFMT_D16_UNORM
,
WINED3DFMT_S1_UINT_D15_UNORM
};
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
/* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate.
...
...
@@ -815,19 +824,27 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
* Likely a lot of other new bugs will be exposed. For that reason request a depth stencil surface all the
* time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
* issue needs to be fixed. */
if
(
!
present_parameters
->
EnableAutoDepthStencil
||
swapchain
->
presentParms
.
AutoDepthStencilFormat
!=
WINED3DFMT_D24_UNORM_S8_UINT
)
for
(
i
=
0
;
i
<
(
sizeof
(
formats
)
/
sizeof
(
*
formats
));
i
++
)
{
FIXME
(
"Add OpenGL context recreation support to context_validate_onscreen_formats
\n
"
);
swapchain
->
ds_format
=
getFormatDescEntry
(
formats
[
i
],
gl_info
);
swapchain
->
context
[
0
]
=
context_create
(
swapchain
,
swapchain
->
front_buffer
,
swapchain
->
ds_format
);
if
(
swapchain
->
context
[
0
])
break
;
TRACE
(
"Depth stencil format %s is not supported, trying next format
\n
"
,
debug_d3dformat
(
formats
[
i
]));
}
swapchain
->
ds_format
=
getFormatDescEntry
(
WINED3DFMT_D24_UNORM_S8_UINT
,
gl_info
);
swapchain
->
context
[
0
]
=
context_create
(
swapchain
,
swapchain
->
front_buffer
,
swapchain
->
ds_format
);
if
(
!
swapchain
->
context
[
0
])
{
WARN
(
"Failed to create context.
\n
"
);
hr
=
WINED3DERR_NOTAVAILABLE
;
goto
err
;
}
if
(
!
present_parameters
->
EnableAutoDepthStencil
||
swapchain
->
presentParms
.
AutoDepthStencilFormat
!=
swapchain
->
ds_format
->
format
)
{
FIXME
(
"Add OpenGL context recreation support to context_validate_onscreen_formats
\n
"
);
}
context_release
(
swapchain
->
context
[
0
]);
}
else
...
...
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