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
4752553d
Commit
4752553d
authored
Sep 19, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Sep 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent CheckDepthStencilMatch from causing problems if there is a
current active OpenGL context.
parent
7df17cec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
13 deletions
+26
-13
directx.c
dlls/wined3d/directx.c
+26
-13
No files found.
dlls/wined3d/directx.c
View file @
4752553d
...
...
@@ -1066,6 +1066,12 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
WINED3DFORMAT
RenderTargetFormat
,
WINED3DFORMAT
DepthStencilFormat
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
HRESULT
hr
=
D3DERR_NOTAVAILABLE
;
WineD3D_Context
*
ctx
=
NULL
;
GLXFBConfig
*
cfgs
=
NULL
;
int
nCfgs
=
0
;
int
it
;
WARN_
(
d3d_caps
)(
"(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))
\n
"
,
This
,
Adapter
,
DeviceType
,
debug_d3ddevicetype
(
DeviceType
),
...
...
@@ -1074,18 +1080,18 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
DepthStencilFormat
,
debug_d3dformat
(
DepthStencilFormat
));
if
(
Adapter
>=
IWineD3D_GetAdapterCount
(
iface
))
{
TRACE
(
"(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning D3DERR_INVALIDCALL
\n
"
,
This
,
Adapter
,
IWineD3D_GetAdapterCount
(
iface
));
return
D3DERR_INVALIDCALL
;
}
{
GLXFBConfig
*
cfgs
=
NULL
;
int
nCfgs
=
0
;
int
it
;
HRESULT
hr
=
D3DERR_NOTAVAILABLE
;
WineD3D_Context
*
ctx
=
WineD3D_CreateFakeGLContext
();
if
(
NULL
!=
ctx
)
{
/* TODO: use the real context if it's available */
ctx
=
WineD3D_CreateFakeGLContext
();
if
(
NULL
!=
ctx
)
{
cfgs
=
glXGetFBConfigs
(
ctx
->
display
,
DefaultScreen
(
ctx
->
display
),
&
nCfgs
);
}
else
{
TRACE_
(
d3d_caps
)(
"(%p) : Unable to create a fake context at this time (there may already be an active context)
\n
"
,
This
);
}
if
(
NULL
!=
cfgs
)
{
for
(
it
=
0
;
it
<
nCfgs
;
++
it
)
{
if
(
IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt
(
ctx
,
cfgs
[
it
],
RenderTargetFormat
))
{
if
(
IWineD3DImpl_IsGLXFBConfigCompatibleWithDepthFmt
(
ctx
,
cfgs
[
it
],
DepthStencilFormat
))
{
...
...
@@ -1095,13 +1101,20 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
}
}
XFree
(
cfgs
);
cfgs
=
NULL
;
}
else
{
/* If there's a corrent context then we cannot create a fake one so pass everything */
hr
=
D3D_OK
;
}
if
(
ctx
!=
NULL
)
WineD3D_ReleaseFakeGLContext
(
ctx
);
return
hr
;
}
}
return
D3DERR_NOTAVAILABLE
;
if
(
hr
!=
D3D_OK
)
TRACE_
(
d3d_caps
)(
"Failed to match stencil format to device
\b
"
);
TRACE_
(
d3d_caps
)(
"(%p) : Returning %d
\n
"
,
This
,
hr
);
return
hr
;
}
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceMultiSampleType
(
IWineD3D
*
iface
,
UINT
Adapter
,
D3DDEVTYPE
DeviceType
,
...
...
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