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
2f1e01bb
Commit
2f1e01bb
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: Put vertex texture capability checking in its own function.
parent
32a32d82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
21 deletions
+53
-21
directx.c
dlls/wined3d/directx.c
+53
-21
No files found.
dlls/wined3d/directx.c
View file @
2f1e01bb
...
...
@@ -2167,6 +2167,29 @@ MAKEFOURCC('I','N','S','T') once
return
FALSE
;
}
static
BOOL
CheckVertexTextureCapability
(
UINT
Adapter
,
WINED3DFORMAT
CheckFormat
)
{
if
(
!
GL_LIMITS
(
vertex_samplers
))
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
switch
(
CheckFormat
)
{
case
WINED3DFMT_A32B32G32R32F
:
if
(
!
GL_SUPPORT
(
ARB_TEXTURE_FLOAT
))
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
default
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
return
FALSE
;
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormat
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
WINED3DFORMAT
AdapterFormat
,
DWORD
Usage
,
WINED3DRESOURCETYPE
RType
,
WINED3DFORMAT
CheckFormat
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
...
...
@@ -2238,6 +2261,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_VERTEXTEXTURE support */
if
(
Usage
&
WINED3DUSAGE_QUERY_VERTEXTEXTURE
)
{
if
(
CheckVertexTextureCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_VERTEXTEXTURE
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query vertextexture support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
}
}
else
if
(
RType
==
WINED3DRTYPE_SURFACE
)
{
...
...
@@ -2310,6 +2343,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_VERTEXTEXTURE support */
if
(
Usage
&
WINED3DUSAGE_QUERY_VERTEXTEXTURE
)
{
if
(
CheckVertexTextureCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_VERTEXTEXTURE
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query vertextexture support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
else
if
(
CheckDepthStencilCapability
(
Adapter
,
AdapterFormat
,
CheckFormat
))
{
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
UsageCaps
|=
WINED3DUSAGE_DEPTHSTENCIL
;
...
...
@@ -2331,6 +2374,16 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* Check QUERY_VERTEXTEXTURE support */
if
(
Usage
&
WINED3DUSAGE_QUERY_VERTEXTEXTURE
)
{
if
(
CheckVertexTextureCapability
(
Adapter
,
CheckFormat
))
{
UsageCaps
|=
WINED3DUSAGE_QUERY_VERTEXTEXTURE
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED] - No query vertextexture support
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
}
/* Filter formats that need conversion; For one part, this conversion is unimplemented,
...
...
@@ -2383,27 +2436,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
break
;
}
}
/* TODO: Check support against more of the WINED3DUSAGE_QUERY_* constants */
if
(
Usage
&
WINED3DUSAGE_QUERY_VERTEXTEXTURE
)
{
if
(
!
GL_LIMITS
(
vertex_samplers
))
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
switch
(
CheckFormat
)
{
case
WINED3DFMT_A32B32G32R32F
:
if
(
!
GL_SUPPORT
(
ARB_TEXTURE_FLOAT
))
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
default
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
/* This format is nothing special and it is supported perfectly.
* However, ati and nvidia driver on windows do not mark this format as
...
...
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