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
0e9d02de
Commit
0e9d02de
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 correct autogenmipmap support.
parent
aa46edd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
directx.c
dlls/wined3d/directx.c
+31
-11
No files found.
dlls/wined3d/directx.c
View file @
0e9d02de
...
...
@@ -2223,13 +2223,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_INVALIDCALL
;
}
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
if
(
!
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No mipmap generation support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
if
(
RType
==
WINED3DRTYPE_CUBETEXTURE
)
{
/* Cubetexture allows:
* - D3DUSAGE_AUTOGENMIPMAP
...
...
@@ -2246,6 +2239,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
if
(
!
Usage
)
return
WINED3D_OK
;
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
/* Check for automatic mipmap generation support */
if
(
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
UsageCaps
|=
WINED3DUSAGE_AUTOGENMIPMAP
;
}
else
{
/* When autogenmipmap isn't around continue and return WINED3DOK_NOAUOTGEN instead of D3D_OK */
TRACE_
(
d3d_caps
)(
"[FAILED] - No autogenmipmap support, but continuing
\n
"
);
}
}
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
{
if
(
CheckRenderTargetCapability
(
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_RENDERTARGET
;
...
...
@@ -2328,6 +2331,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
if
(
!
Usage
)
return
WINED3D_OK
;
if
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)
{
/* Check for automatic mipmap generation support */
if
(
GL_SUPPORT
(
SGIS_GENERATE_MIPMAP
))
{
UsageCaps
|=
WINED3DUSAGE_AUTOGENMIPMAP
;
}
else
{
/* When autogenmipmap isn't around continue and return WINED3DOK_NOAUOTGEN instead of D3D_OK */
TRACE_
(
d3d_caps
)(
"[FAILED] - No autogenmipmap support, but continuing
\n
"
);
}
}
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
{
if
(
CheckRenderTargetCapability
(
AdapterFormat
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_RENDERTARGET
;
...
...
@@ -2631,10 +2644,17 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
break
;
}
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
/* When the UsageCaps exactly matches Usage return WINED3D_OK except for the situation in which
* WINED3DUSAGE_AUTOGENMIPMAP isn't around, then WINED3DOK_NOAUTOGEN is returned if all the other
* usage flags match. */
if
(
UsageCaps
==
Usage
)
{
return
WINED3D_OK
;
}
else
if
((
UsageCaps
==
(
Usage
&
~
WINED3DUSAGE_AUTOGENMIPMAP
))
&&
(
Usage
&
WINED3DUSAGE_AUTOGENMIPMAP
)){
return
WINED3DOK_NOAUTOGEN
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - Usage=%#08x requested but only %#08x is available
\n
"
,
Usage
,
UsageCaps
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormatConversion
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
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