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
98b56c3f
Commit
98b56c3f
authored
Apr 05, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Report D3DUSAGE_QUERY_WRAPANDMIP support.
parent
67e0943b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
directx.c
dlls/wined3d/directx.c
+46
-0
No files found.
dlls/wined3d/directx.c
View file @
98b56c3f
...
@@ -2053,6 +2053,19 @@ static BOOL CheckPostPixelShaderBlendingCapability(UINT Adapter, WINED3DFORMAT C
...
@@ -2053,6 +2053,19 @@ static BOOL CheckPostPixelShaderBlendingCapability(UINT Adapter, WINED3DFORMAT C
return
FALSE
;
return
FALSE
;
}
}
static
BOOL
CheckWrapAndMipCapability
(
UINT
Adapter
,
WINED3DFORMAT
CheckFormat
)
{
/* OpenGL supports mipmapping on all formats basically. Wrapping is unsupported,
* but we have to report mipmapping so we cannot reject this flag. Tests show that
* windows reports WRAPANDMIP on unfilterable surfaces as well, apparently to show
* that wrapping is supported. The lack of filtering will sort out the mipmapping
* capability anyway.
*
* For now lets report this on all formats, but in the future we may want to
* restrict it to some should games need that
*/
return
TRUE
;
}
/* Check if a texture format is supported on the given adapter */
/* Check if a texture format is supported on the given adapter */
static
BOOL
CheckTextureCapability
(
UINT
Adapter
,
WINED3DFORMAT
CheckFormat
)
static
BOOL
CheckTextureCapability
(
UINT
Adapter
,
WINED3DFORMAT
CheckFormat
)
{
{
...
@@ -2312,6 +2325,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2312,6 +2325,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_RENDERTARGET
* - D3DUSAGE_RENDERTARGET
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_QUERY_WRAPANDMIP
*/
*/
if
(
GL_SUPPORT
(
ARB_TEXTURE_CUBE_MAP
))
{
if
(
GL_SUPPORT
(
ARB_TEXTURE_CUBE_MAP
))
{
/* Check if the texture format is around */
/* Check if the texture format is around */
...
@@ -2392,6 +2406,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2392,6 +2406,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
}
/* Check QUERY_WRAPANDMIP support */
if
(
Usage
&
WINED3DUSAGE_QUERY_WRAPANDMIP
)
{
if
(
CheckWrapAndMipCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_WRAPANDMIP
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No wrapping and mipmapping support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
else
{
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - Cube texture format not supported
\n
"
);
TRACE_
(
d3d_caps
)(
"[FAILED] - Cube texture format not supported
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
...
@@ -2444,6 +2468,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2444,6 +2468,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
* - D3DUSAGE_RENDERTARGET
* - D3DUSAGE_RENDERTARGET
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_TEXTAPI (d3d9ex)
* - D3DUSAGE_TEXTAPI (d3d9ex)
* - D3DUSAGE_QUERY_WRAPANDMIP
*/
*/
/* Check if the texture format is around */
/* Check if the texture format is around */
...
@@ -2534,6 +2559,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2534,6 +2559,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
}
/* Check QUERY_WRAPANDMIP support */
if
(
Usage
&
WINED3DUSAGE_QUERY_WRAPANDMIP
)
{
if
(
CheckWrapAndMipCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_WRAPANDMIP
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No wrapping and mipmapping support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
else
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
}
else
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
UsageCaps
|=
WINED3DUSAGE_DEPTHSTENCIL
;
UsageCaps
|=
WINED3DUSAGE_DEPTHSTENCIL
;
...
@@ -2549,6 +2584,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2549,6 +2584,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
* - D3DUSAGE_DYNAMIC
* - D3DUSAGE_DYNAMIC
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_NONSECURE (d3d9ex)
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_SOFTWAREPROCESSING
* - D3DUSAGE_QUERY_WRAPANDMIP
*/
*/
/* Check volume texture and volume usage caps */
/* Check volume texture and volume usage caps */
...
@@ -2615,6 +2651,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
...
@@ -2615,6 +2651,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
}
/* Check QUERY_WRAPANDMIP support */
if
(
Usage
&
WINED3DUSAGE_QUERY_WRAPANDMIP
)
{
if
(
CheckWrapAndMipCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_WRAPANDMIP
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No wrapping and mipmapping support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
else
{
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No volume texture support
\n
"
);
TRACE_
(
d3d_caps
)(
"[FAILED] - No volume texture support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
return
WINED3DERR_NOTAVAILABLE
;
...
...
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