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
2fc534ed
Commit
2fc534ed
authored
Aug 28, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Simplify Z format parsing a bit, remove ERRs.
parent
26497611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
31 deletions
+18
-31
utils.c
dlls/ddraw/utils.c
+18
-31
No files found.
dlls/ddraw/utils.c
View file @
2fc534ed
...
@@ -519,31 +519,22 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
...
@@ -519,31 +519,22 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
{
{
switch
(
DDPixelFormat
->
u1
.
dwZBufferBitDepth
)
switch
(
DDPixelFormat
->
u1
.
dwZBufferBitDepth
)
{
{
case
8
:
FIXME
(
"8 Bits Z+Stencil buffer pixelformat is not supported. Returning WINED3DFMT_UNKNOWN
\n
"
);
return
WINED3DFMT_UNKNOWN
;
case
15
:
FIXME
(
"15 bit depth buffer not handled yet, assuming 16 bit
\n
"
);
case
16
:
case
16
:
if
(
DDPixelFormat
->
u2
.
dwStencilBitDepth
==
1
)
if
(
DDPixelFormat
->
u2
.
dwStencilBitDepth
==
1
)
return
WINED3DFMT_S1_UINT_D15_UNORM
;
return
WINED3DFMT_S1_UINT_D15_UNORM
;
WARN
(
"Unknown depth stenil format: 16 z bits, %u stencil bits
\n
"
,
DDPixelFormat
->
u2
.
dwStencilBitDepth
);
FIXME
(
"Don't know how to handle a 16 bit Z buffer with %d bit stencil buffer pixelformat
\n
"
,
DDPixelFormat
->
u2
.
dwStencilBitDepth
);
return
WINED3DFMT_UNKNOWN
;
return
WINED3DFMT_UNKNOWN
;
case
24
:
FIXME
(
"Don't know how to handle a 24 bit depth buffer with stencil bits
\n
"
);
return
WINED3DFMT_D24_UNORM_S8_UINT
;
case
32
:
case
32
:
if
(
DDPixelFormat
->
u2
.
dwStencilBitDepth
==
8
)
if
(
DDPixelFormat
->
u2
.
dwStencilBitDepth
==
8
)
return
WINED3DFMT_D24_UNORM_S8_UINT
;
return
WINED3DFMT_D24_UNORM_S8_UINT
;
else
if
(
DDPixelFormat
->
u2
.
dwStencilBitDepth
==
4
)
return
WINED3DFMT_S4X4_UINT_D24_UNORM
;
else
WARN
(
"Unknown depth stenil format: 32 z bits, %u stencil bits
\n
"
,
return
WINED3DFMT_S4X4_UINT_D24_UNORM
;
DDPixelFormat
->
u2
.
dwStencilBitDepth
);
return
WINED3DFMT_UNKNOWN
;
default:
default:
ERR
(
"Unknown Z buffer depth %d
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
);
WARN
(
"Unknown depth stenil format: %u z bits, %u stencil bits
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
,
DDPixelFormat
->
u2
.
dwStencilBitDepth
);
return
WINED3DFMT_UNKNOWN
;
return
WINED3DFMT_UNKNOWN
;
}
}
}
}
...
@@ -551,10 +542,6 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
...
@@ -551,10 +542,6 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
{
{
switch
(
DDPixelFormat
->
u1
.
dwZBufferBitDepth
)
switch
(
DDPixelFormat
->
u1
.
dwZBufferBitDepth
)
{
{
case
8
:
ERR
(
"8 Bit Z buffers are not supported. Trying a 16 Bit one
\n
"
);
return
WINED3DFMT_D16_UNORM
;
case
16
:
case
16
:
return
WINED3DFMT_D16_UNORM
;
return
WINED3DFMT_D16_UNORM
;
...
@@ -562,16 +549,16 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
...
@@ -562,16 +549,16 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
return
WINED3DFMT_X8D24_UNORM
;
return
WINED3DFMT_X8D24_UNORM
;
case
32
:
case
32
:
if
(
DDPixelFormat
->
u3
.
dwZBitMask
==
0x00FFFFFF
)
{
if
(
DDPixelFormat
->
u3
.
dwZBitMask
==
0x00FFFFFF
)
return
WINED3DFMT_X8D24_UNORM
;
return
WINED3DFMT_X8D24_UNORM
;
else
if
(
DDPixelFormat
->
u3
.
dwZBitMask
==
0xFFFFFF00
)
return
WINED3DFMT_X8D24_UNORM
;
}
else
if
(
DDPixelFormat
->
u3
.
dwZBitMask
==
0xFFFFFFFF
)
{
else
if
(
DDPixelFormat
->
u3
.
dwZBitMask
==
0xFFFFFFFF
)
return
WINED3DFMT_D32_UNORM
;
return
WINED3DFMT_D32_UNORM
;
WARN
(
"Unknown depth-only format: 32 z bits, mask 0x%08x
\n
"
,
}
DDPixelFormat
->
u3
.
dwZBitMask
);
FIXME
(
"Unhandled 32 bit depth buffer bitmasks, returning WINED3DFMT_D24X8
\n
"
);
return
WINED3DFMT_UNKNOWN
;
return
WINED3DFMT_X8D24_UNORM
;
/* That's most likely to make games happy */
default:
default:
ERR
(
"Unsupported Z buffer depth %d
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
);
WARN
(
"Unknown depth-only format: %u z bits, mask 0x%08x
\n
"
,
DDPixelFormat
->
u1
.
dwZBufferBitDepth
,
DDPixelFormat
->
u3
.
dwZBitMask
);
return
WINED3DFMT_UNKNOWN
;
return
WINED3DFMT_UNKNOWN
;
}
}
}
}
...
...
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