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
aa46edd6
Commit
aa46edd6
authored
Mar 17, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a function which checks the filtering capabilities for a format.
parent
2f1e01bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
12 deletions
+45
-12
directx.c
dlls/wined3d/directx.c
+45
-12
No files found.
dlls/wined3d/directx.c
View file @
aa46edd6
...
@@ -1873,6 +1873,21 @@ WINED3DFORMAT DepthStencilFormat)
...
@@ -1873,6 +1873,21 @@ WINED3DFORMAT DepthStencilFormat)
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
CheckFilterCapability
(
WINED3DFORMAT
CheckFormat
)
{
switch
(
CheckFormat
)
{
/* Filtering not supported */
case
WINED3DFMT_R32F
:
case
WINED3DFMT_A32B32G32R32F
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
default
:
break
;
}
return
TRUE
;
}
/* Check the render target capabilities of a format */
/* Check the render target capabilities of a format */
static
BOOL
CheckRenderTargetCapability
(
WINED3DFORMAT
AdapterFormat
,
WINED3DFORMAT
CheckFormat
)
static
BOOL
CheckRenderTargetCapability
(
WINED3DFORMAT
AdapterFormat
,
WINED3DFORMAT
CheckFormat
)
{
{
...
@@ -2208,18 +2223,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2208,18 +2223,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
}
if
(
Usage
&
WINED3DUSAGE_QUERY_FILTER
)
{
switch
(
CheckFormat
)
{
/* Filtering not supported */
case
WINED3DFMT_R32F
:
case
WINED3DFMT_A32B32G32R32F
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
default
:
break
;
}
}
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No mipmap generation support
\n
"
);
TRACE_
(
d3d_caps
)(
"[FAILED] - No mipmap generation support
\n
"
);
...
@@ -2252,6 +2255,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2252,6 +2255,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
}
}
/* Check QUERY_FILTER support */
if
(
Usage
&
WINED3DUSAGE_QUERY_FILTER
)
{
if
(
CheckFilterCapability
(
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_FILTER
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query filter support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_SRGBREAD support */
/* Check QUERY_SRGBREAD support */
if
(
Usage
&
WINED3DUSAGE_QUERY_SRGBREAD
)
{
if
(
Usage
&
WINED3DUSAGE_QUERY_SRGBREAD
)
{
if
(
CheckSrgbReadCapability
(
Adapter
,
CheckFormat
))
{
if
(
CheckSrgbReadCapability
(
Adapter
,
CheckFormat
))
{
...
@@ -2324,6 +2337,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2324,6 +2337,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
}
}
}
/* Check QUERY_FILTER support */
if
(
Usage
&
WINED3DUSAGE_QUERY_FILTER
)
{
if
(
CheckFilterCapability
(
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_FILTER
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query filter support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_LEGACYBUMPMAP support */
/* Check QUERY_LEGACYBUMPMAP support */
if
(
Usage
&
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
)
{
if
(
Usage
&
WINED3DUSAGE_QUERY_LEGACYBUMPMAP
)
{
if
(
CheckBumpMapCapability
(
Adapter
,
CheckFormat
))
{
if
(
CheckBumpMapCapability
(
Adapter
,
CheckFormat
))
{
...
@@ -2365,6 +2388,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2365,6 +2388,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_FILTER support */
if
(
Usage
&
WINED3DUSAGE_QUERY_FILTER
)
{
if
(
CheckFilterCapability
(
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_FILTER
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query filter support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_SRGBREAD support */
/* Check QUERY_SRGBREAD support */
if
(
Usage
&
WINED3DUSAGE_QUERY_SRGBREAD
)
{
if
(
Usage
&
WINED3DUSAGE_QUERY_SRGBREAD
)
{
if
(
CheckSrgbReadCapability
(
Adapter
,
CheckFormat
))
{
if
(
CheckSrgbReadCapability
(
Adapter
,
CheckFormat
))
{
...
...
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