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
2ed609f1
Commit
2ed609f1
authored
May 24, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
May 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a conversion function for WINED3DFMT_X8D24_UNORM.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
01092d64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
utils.c
dlls/wined3d/utils.c
+24
-4
No files found.
dlls/wined3d/utils.c
View file @
2ed609f1
...
...
@@ -828,6 +828,26 @@ static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT src_row_p
}
}
static
void
convert_x8_d24_unorm
(
const
BYTE
*
src
,
BYTE
*
dst
,
UINT
src_row_pitch
,
UINT
src_slice_pitch
,
UINT
dst_row_pitch
,
UINT
dst_slice_pitch
,
UINT
width
,
UINT
height
,
UINT
depth
)
{
unsigned
int
x
,
y
,
z
;
for
(
z
=
0
;
z
<
depth
;
++
z
)
{
for
(
y
=
0
;
y
<
height
;
++
y
)
{
const
DWORD
*
source
=
(
const
DWORD
*
)(
src
+
z
*
src_slice_pitch
+
y
*
src_row_pitch
);
DWORD
*
dest
=
(
DWORD
*
)(
dst
+
z
*
dst_slice_pitch
+
y
*
dst_row_pitch
);
for
(
x
=
0
;
x
<
width
;
++
x
)
{
dest
[
x
]
=
source
[
x
]
<<
8
|
source
[
x
]
>>
16
;
}
}
}
}
static
BOOL
color_in_range
(
const
struct
wined3d_color_key
*
color_key
,
DWORD
color
)
{
/* FIXME: Is this really how color keys are supposed to work? I think it
...
...
@@ -1571,14 +1591,14 @@ static const struct wined3d_format_texture_info format_texture_info[] =
|
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
|
WINED3DFMT_FLAG_SHADOW
,
ARB_FRAMEBUFFER_OBJECT
,
NULL
},
{
WINED3DFMT_X8D24_UNORM
,
GL_DEPTH_COMPONENT
,
GL_DEPTH_COMPONENT
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
4
,
WINED3DFMT_FLAG_DEPTH
,
WINED3D_GL_EXT_NONE
,
NULL
},
WINED3D_GL_EXT_NONE
,
convert_x8_d24_unorm
},
{
WINED3DFMT_X8D24_UNORM
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
4
,
WINED3DFMT_FLAG_TEXTURE
|
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_SHADOW
,
ARB_DEPTH_TEXTURE
,
NULL
},
ARB_DEPTH_TEXTURE
,
convert_x8_d24_unorm
},
{
WINED3DFMT_S4X4_UINT_D24_UNORM
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
,
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_SHADOW
,
...
...
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