Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
4752553d
Commit
4752553d
authored
19 years ago
by
Oliver Stieber
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Prevent CheckDepthStencilMatch from causing problems if there is a
current active OpenGL context.
parent
7df17cec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wined3d/directx.c
+26
-13
26 additions, 13 deletions
dlls/wined3d/directx.c
with
26 additions
and
13 deletions
dlls/wined3d/directx.c
+
26
−
13
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment