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
438b6bd4
Commit
438b6bd4
authored
Aug 07, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Test formats for surface support.
parent
fc6b9774
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
21 deletions
+38
-21
directx.c
dlls/wined3d/directx.c
+38
-21
No files found.
dlls/wined3d/directx.c
View file @
438b6bd4
...
...
@@ -2410,6 +2410,17 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
return
FALSE
;
}
static
BOOL
CheckSurfaceCapability
(
UINT
Adapter
,
WINED3DFORMAT
AdapterFormat
,
WINED3DFORMAT
CheckFormat
)
{
/* All format that are supported for textures are supported for surfaces as well */
if
(
CheckTextureCapability
(
Adapter
,
CheckFormat
))
return
TRUE
;
/* All depth stencil formats are supported on surfaces */
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
return
TRUE
;
/* Reject other formats */
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
static
BOOL
CheckVertexTextureCapability
(
UINT
Adapter
,
WINED3DFORMAT
CheckFormat
)
{
if
(
!
GL_LIMITS
(
vertex_samplers
))
{
...
...
@@ -2565,33 +2576,39 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
* - D3DUSAGE_RENDERTARGET
*/
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_DEPTHSTENCIL
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No depthstencil support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
if
(
CheckSurfaceCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_DEPTHSTENCIL
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No depthstencil support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
{
if
(
CheckRenderTargetCapability
(
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_RENDERTARGET
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No rendertarget support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
{
if
(
CheckRenderTargetCapability
(
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_RENDERTARGET
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No rendertarget support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
/* Check QUERY_POSTPIXELSHADER_BLENDING support */
if
(
Usage
&
WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
)
{
if
(
CheckPostPixelShaderBlendingCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query post pixelshader blending support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
/* Check QUERY_POSTPIXELSHADER_BLENDING support */
if
(
Usage
&
WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
)
{
if
(
CheckPostPixelShaderBlendingCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query post pixelshader blending support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - Not supported for plain surfaces
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
else
if
(
RType
==
WINED3DRTYPE_TEXTURE
)
{
/* Texture allows:
* - D3DUSAGE_AUTOGENMIPMAP
...
...
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