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
9e9ef623
Commit
9e9ef623
authored
Mar 21, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove unneeded code in CheckDeviceFormat.
All these checks are done during the capability checks which are performed under the resource type checks.
parent
5d151c0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
151 deletions
+1
-151
directx.c
dlls/wined3d/directx.c
+1
-151
No files found.
dlls/wined3d/directx.c
View file @
9e9ef623
...
...
@@ -2170,8 +2170,7 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
* MAKEFOURCC('I','N','S','T') is used. Should a (broken) app check for this provide a proper return value.
* We can do instancing with all shader versions, but we need vertex shaders.
*
* Additionally applications have to set the D3DRS_POINTSIZE render state to
MAKEFOURCC('I','N','S','T') once
* Additionally applications have to set the D3DRS_POINTSIZE render state to MAKEFOURCC('I','N','S','T') once
* to enable instancing. WineD3D doesn't need that and just ignores it.
*
* With Shader Model 3.0 capable cards Instancing 'just works' in Windows.
...
...
@@ -2556,155 +2555,6 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_NOTAVAILABLE
;
}
switch
(
CheckFormat
)
{
/*****
* supported: RGB(A) formats
*/
case
WINED3DFMT_R8G8B8
:
/* Enable for dx7, blacklisted for 8 and 9 above */
case
WINED3DFMT_A8R8G8B8
:
case
WINED3DFMT_X8R8G8B8
:
case
WINED3DFMT_R5G6B5
:
case
WINED3DFMT_X1R5G5B5
:
case
WINED3DFMT_A1R5G5B5
:
case
WINED3DFMT_A4R4G4B4
:
case
WINED3DFMT_R3G3B2
:
case
WINED3DFMT_A8
:
case
WINED3DFMT_X4R4G4B4
:
case
WINED3DFMT_A8B8G8R8
:
case
WINED3DFMT_X8B8G8R8
:
case
WINED3DFMT_A2R10G10B10
:
case
WINED3DFMT_A2B10G10R10
:
case
WINED3DFMT_G16R16
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/*****
* supported: Palettized
*/
case
WINED3DFMT_P8
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/*****
* Supported: (Alpha)-Luminance
*/
case
WINED3DFMT_L8
:
case
WINED3DFMT_A8L8
:
case
WINED3DFMT_A4L4
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/*****
* Not supported everywhere(depends on GL_ATI_envmap_bumpmap or
* GL_NV_texture_shader), but advertized to make apps happy.
* Enable some because games often fail when they are not available
* and are still playable even without bump mapping
*/
case
WINED3DFMT_V8U8
:
case
WINED3DFMT_V16U16
:
case
WINED3DFMT_L6V5U5
:
case
WINED3DFMT_X8L8V8U8
:
case
WINED3DFMT_Q8W8V8U8
:
WARN_
(
d3d_caps
)(
"[Not supported, but pretended to do]
\n
"
);
return
WINED3D_OK
;
/* Those are not advertized by the nvidia windows driver, and not
* supported natively by GL_NV_texture_shader or GL_ATI_envmap_bumpmap.
* WINED3DFMT_A2W10V10U10 could be loaded into shaders using the unsigned
* ARGB format if needed
*/
case
WINED3DFMT_W11V11U10
:
case
WINED3DFMT_A2W10V10U10
:
WARN_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
case
WINED3DFMT_DXT1
:
case
WINED3DFMT_DXT2
:
case
WINED3DFMT_DXT3
:
case
WINED3DFMT_DXT4
:
case
WINED3DFMT_DXT5
:
if
(
GL_SUPPORT
(
EXT_TEXTURE_COMPRESSION_S3TC
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
/*****
* Odd formats - not supported
*/
case
WINED3DFMT_VERTEXDATA
:
case
WINED3DFMT_INDEX16
:
case
WINED3DFMT_INDEX32
:
case
WINED3DFMT_Q16W16V16U16
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
WINED3DERR_NOTAVAILABLE
;
/*****
* WINED3DFMT_CxV8U8: Not supported right now
*/
case
WINED3DFMT_CxV8U8
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
WINED3DERR_NOTAVAILABLE
;
/* Not supported */
case
WINED3DFMT_A16B16G16R16
:
case
WINED3DFMT_A8R3G3B2
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
WINED3DERR_NOTAVAILABLE
;
/* Floating point formats */
case
WINED3DFMT_R16F
:
case
WINED3DFMT_A16B16G16R16F
:
if
(
GL_SUPPORT
(
ARB_HALF_FLOAT_PIXEL
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
case
WINED3DFMT_R32F
:
case
WINED3DFMT_A32B32G32R32F
:
if
(
GL_SUPPORT
(
ARB_TEXTURE_FLOAT
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
case
WINED3DFMT_G16R16F
:
case
WINED3DFMT_G32R32F
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
/* ATI instancing hack: Although ATI cards do not support Shader Model 3.0, they support
* instancing. To query if the card supports instancing CheckDeviceFormat with the special format
* MAKEFOURCC('I','N','S','T') is used. Should a (broken) app check for this provide a proper return value.
* We can do instancing with all shader versions, but we need vertex shaders.
*
* Additionally applications have to set the D3DRS_POINTSIZE render state to MAKEFOURCC('I','N','S','T') once
* to enable instancing. WineD3D doesn't need that and just ignores it.
*
* With Shader Model 3.0 capable cards Instancing 'just works' in Windows.
*/
case
WINEMAKEFOURCC
(
'I'
,
'N'
,
'S'
,
'T'
):
TRACE
(
"ATI Instancing check hack
\n
"
);
if
(
GL_SUPPORT
(
ARB_VERTEX_PROGRAM
)
||
GL_SUPPORT
(
ARB_VERTEX_SHADER
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
}
else
{
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
default
:
break
;
}
/* 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. */
...
...
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