Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
127613bc
Commit
127613bc
authored
Jul 22, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Whitelist pixelformats instead of blacklisting.
parent
a64febd3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
42 deletions
+123
-42
directx.c
dlls/wined3d/directx.c
+121
-40
utils.c
dlls/wined3d/utils.c
+2
-2
No files found.
dlls/wined3d/directx.c
View file @
127613bc
...
...
@@ -1414,6 +1414,46 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
return
WINED3DERR_INVALIDCALL
;
}
if
(
Usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
switch
(
CheckFormat
)
{
case
WINED3DFMT_D16_LOCKABLE
:
case
WINED3DFMT_D32
:
case
WINED3DFMT_D15S1
:
case
WINED3DFMT_D24S8
:
case
WINED3DFMT_D24X8
:
case
WINED3DFMT_D24X4S4
:
case
WINED3DFMT_D16
:
case
WINED3DFMT_L16
:
case
WINED3DFMT_D32F_LOCKABLE
:
case
WINED3DFMT_D24FS8
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
D3D_OK
;
default:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
else
if
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
{
switch
(
CheckFormat
)
{
case
WINED3DFMT_R8G8B8
:
case
WINED3DFMT_A8R8G8B8
:
case
WINED3DFMT_X8R8G8B8
:
case
WINED3DFMT_R5G6B5
:
case
WINED3DFMT_X1R5G5B5
:
case
WINED3DFMT_A1R5G5B5
:
case
WINED3DFMT_A4R4G4B4
:
case
WINED3DFMT_R3G3B2
:
case
WINED3DFMT_X4R4G4B4
:
case
WINED3DFMT_A8B8G8R8
:
case
WINED3DFMT_X8B8G8R8
:
case
WINED3DFMT_P8
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
default:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
}
if
(
GL_SUPPORT
(
EXT_TEXTURE_COMPRESSION_S3TC
))
{
switch
(
CheckFormat
)
{
case
D3DFMT_DXT1
:
...
...
@@ -1429,65 +1469,106 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
}
switch
(
CheckFormat
)
{
/*****
* check supported using GL_SUPPORT
* supported: RGB(A) formats
*/
case
D3DFMT_DXT1
:
case
D3DFMT_DXT2
:
case
D3DFMT_DXT3
:
case
D3DFMT_DXT4
:
case
D3DFMT_DXT5
:
case
WINED3DFMT_R8G8B8
:
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_A8R3G3B2
:
case
WINED3DFMT_X4R4G4B4
:
case
WINED3DFMT_A8B8G8R8
:
case
WINED3DFMT_X8B8G8R8
:
case
WINED3DFMT_A2R10G10B10
:
case
WINED3DFMT_A2B10G10R10
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/*****
* support
ed
* supported: Palettiz
ed
*/
/*case D3DFMT_R5G6B5: */
/*case D3DFMT_X1R5G5B5:*/
/*case D3DFMT_A1R5G5B5: */
/*case D3DFMT_A4R4G4B4:*/
case
WINED3DFMT_P8
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/*****
* unsupported
* Supported: (Alpha)-Luminance
*/
case
WINED3DFMT_L8
:
case
WINED3DFMT_A8L8
:
case
WINED3DFMT_A4L4
:
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
WINED3D_OK
;
/* color buffer */
/*case D3DFMT_X8R8G8B8:*/
case
D3DFMT_A8R3G3B2
:
/*****
* Not supported for now: Bump mapping formats
* 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
:
WARN_
(
d3d_caps
)(
"[Not supported, but pretended to do]
\n
"
);
return
WINED3D_OK
;
/* Paletted */
case
D3DFMT_P8
:
case
D3DFMT_A8P8
:
case
WINED3DFMT_L6V5U5
:
case
WINED3DFMT_X8L8V8U8
:
case
WINED3DFMT_Q8W8V8U8
:
case
WINED3DFMT_W11V11U10
:
case
WINED3DFMT_A2W10V10U10
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
D3DERR_NOTAVAILABLE
;
/* Luminance */
case
D3DFMT_L8
:
case
D3DFMT_A8L8
:
case
D3DFMT_A4L4
:
/*****
* DXTN Formats: Handled above
* WINED3DFMT_DXT1
* WINED3DFMT_DXT2
* WINED3DFMT_DXT3
* WINED3DFMT_DXT4
* WINED3DFMT_DXT5
*/
/* Bump */
#if 0
case D3DFMT_V8U8:
case D3DFMT_V16U16
:
#endif
case
D3DFMT_L6V5U5
:
case
D3DFMT_X8L8V8U8
:
case
D3DFMT_Q8W8V8U8
:
case
D3DFMT_W11V11U10
:
/*****
* 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
D3DERR_NOTAVAILABLE
;
/
****
* currently hard to support
/*
****
* Float formats: Not supported right now
*/
case
D3DFMT_UYVY
:
case
D3DFMT_YUY2
:
case
WINED3DFMT_R16F
:
case
WINED3DFMT_G16R16F
:
case
WINED3DFMT_A16B16G16R16F
:
case
WINED3DFMT_R32F
:
case
WINED3DFMT_G32R32F
:
case
WINED3DFMT_A32B32G32R32F
:
case
WINED3DFMT_CxV8U8
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
D3DERR_NOTAVAILABLE
;
/* Not supported */
case
WINED3DFMT_G16R16
:
case
WINED3DFMT_A16B16G16R16
:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
/* Enable when implemented */
return
D3DERR_NOTAVAILABLE
;
/* Since we do not support these formats right now, don't pretend to. */
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
default:
break
;
}
TRACE_
(
d3d_caps
)(
"[
OK
]
\n
"
);
return
WINED3D_OK
;
TRACE_
(
d3d_caps
)(
"[
FAILED
]
\n
"
);
return
D3DERR_NOTAVAILABLE
;
}
static
HRESULT
WINAPI
IWineD3DImpl_CheckDeviceFormatConversion
(
IWineD3D
*
iface
,
UINT
Adapter
,
WINED3DDEVTYPE
DeviceType
,
...
...
dlls/wined3d/utils.c
View file @
127613bc
...
...
@@ -71,11 +71,11 @@ static const PixelFormatDesc formats[] = {
{
WINED3DFMT_A8
,
0x000000ff
,
0x0
,
0x0
,
0x0
,
1
,
FALSE
,
GL_ALPHA8
,
GL_ALPHA
,
GL_ALPHA
},
{
WINED3DFMT_A8R3G3B2
,
0x0000ff00
,
0x000000e0
,
0x0000001c
,
0x00000003
,
2
,
FALSE
,
0
,
0
,
0
},
{
WINED3DFMT_X4R4G4B4
,
0x0
,
0x00000f00
,
0x000000f0
,
0x0000000f
,
2
,
FALSE
,
GL_RGB4
,
GL_BGRA
,
GL_UNSIGNED_SHORT_4_4_4_4_REV
},
{
WINED3DFMT_A2B10G10R10
,
0xb0000000
,
0x000003ff
,
0x000ffc00
,
0x3ff00000
,
4
,
FALSE
,
0
,
0
,
0
},
{
WINED3DFMT_A2B10G10R10
,
0xb0000000
,
0x000003ff
,
0x000ffc00
,
0x3ff00000
,
4
,
FALSE
,
GL_RGB
,
GL_RGBA
,
GL_UNSIGNED_INT_2_10_10_10_REV
},
{
WINED3DFMT_A8B8G8R8
,
0xff000000
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
4
,
FALSE
,
GL_RGBA8
,
GL_RGBA
,
GL_UNSIGNED_INT_8_8_8_8_REV
},
{
WINED3DFMT_X8B8G8R8
,
0x0
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
4
,
FALSE
,
GL_RGB8
,
GL_RGBA
,
GL_UNSIGNED_INT_8_8_8_8_REV
},
{
WINED3DFMT_G16R16
,
0x0
,
0x0000ffff
,
0xffff0000
,
0x0
,
4
,
FALSE
,
0
,
0
,
0
},
{
WINED3DFMT_A2R10G10B10
,
0xb0000000
,
0x3ff00000
,
0x000ffc00
,
0x000003ff
,
4
,
FALSE
,
0
,
0
,
0
},
{
WINED3DFMT_A2R10G10B10
,
0xb0000000
,
0x3ff00000
,
0x000ffc00
,
0x000003ff
,
4
,
FALSE
,
GL_RGBA
,
GL_BGRA
,
GL_UNSIGNED_INT_2_10_10_10_REV
},
{
WINED3DFMT_A16B16G16R16
,
0x0
,
0x0000ffff
,
0xffff0000
,
0x0
,
8
,
FALSE
,
GL_RGBA16_EXT
,
GL_RGBA
,
GL_UNSIGNED_SHORT
},
/* Luminance */
{
WINED3DFMT_L8
,
0x0
,
0x0
,
0x0
,
0x0
,
1
,
FALSE
,
GL_LUMINANCE8
,
GL_LUMINANCE
,
GL_UNSIGNED_BYTE
},
...
...
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