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
485040bb
Commit
485040bb
authored
Apr 12, 2010
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Apr 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move D24FS8 to formats table.
parent
798ba56c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
29 deletions
+21
-29
surface.c
dlls/wined3d/surface.c
+0
-27
utils.c
dlls/wined3d/utils.c
+21
-2
No files found.
dlls/wined3d/surface.c
View file @
485040bb
...
...
@@ -2267,14 +2267,6 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
}
break
;
case
WINED3DFMT_S8_UINT_D24_FLOAT
:
if
(
gl_info
->
supported
[
ARB_DEPTH_BUFFER_FLOAT
])
{
*
convert
=
CONVERT_D24FS8
;
desc
->
conv_byte_count
=
8
;
}
break
;
default:
break
;
}
...
...
@@ -2621,25 +2613,6 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI
break
;
}
case
CONVERT_D24FS8
:
{
unsigned
int
x
,
y
;
for
(
y
=
0
;
y
<
height
;
++
y
)
{
const
DWORD
*
source
=
(
const
DWORD
*
)(
src
+
y
*
pitch
);
float
*
dest_f
=
(
float
*
)(
dst
+
y
*
outpitch
);
DWORD
*
dest_s
=
(
DWORD
*
)(
dst
+
y
*
outpitch
);
for
(
x
=
0
;
x
<
width
;
++
x
)
{
dest_f
[
x
*
2
]
=
float_24_to_32
((
source
[
x
]
&
0xffffff00
)
>>
8
);
dest_s
[
x
*
2
+
1
]
=
source
[
x
]
&
0xff
;
}
}
break
;
}
default:
ERR
(
"Unsupported conversion type %#x.
\n
"
,
convert
);
}
...
...
dlls/wined3d/utils.c
View file @
485040bb
...
...
@@ -417,6 +417,25 @@ static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT wi
}
}
static
void
convert_s8_uint_d24_float
(
const
BYTE
*
src
,
BYTE
*
dst
,
UINT
pitch
,
UINT
width
,
UINT
height
)
{
unsigned
int
x
,
y
;
UINT
outpitch
=
pitch
*
2
;
for
(
y
=
0
;
y
<
height
;
++
y
)
{
const
DWORD
*
source
=
(
const
DWORD
*
)(
src
+
y
*
pitch
);
float
*
dest_f
=
(
float
*
)(
dst
+
y
*
outpitch
);
DWORD
*
dest_s
=
(
DWORD
*
)(
dst
+
y
*
outpitch
);
for
(
x
=
0
;
x
<
width
;
++
x
)
{
dest_f
[
x
*
2
]
=
float_24_to_32
((
source
[
x
]
&
0xffffff00
)
>>
8
);
dest_s
[
x
*
2
+
1
]
=
source
[
x
]
&
0xff
;
}
}
}
static
const
struct
wined3d_format_texture_info
format_texture_info
[]
=
{
/* WINED3DFORMAT internal srgbInternal rtInternal
...
...
@@ -702,9 +721,9 @@ static const struct wined3d_format_texture_info format_texture_info[] =
WINED3DFMT_FLAG_DEPTH
,
ARB_DEPTH_BUFFER_FLOAT
,
NULL
},
{
WINED3DFMT_S8_UINT_D24_FLOAT
,
GL_DEPTH32F_STENCIL8
,
GL_DEPTH32F_STENCIL8
,
0
,
GL_DEPTH_STENCIL
,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV
,
0
,
GL_DEPTH_STENCIL
,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV
,
8
,
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
,
ARB_DEPTH_BUFFER_FLOAT
,
NULL
},
ARB_DEPTH_BUFFER_FLOAT
,
&
convert_s8_uint_d24_float
},
/* Vendor-specific formats */
{
WINED3DFMT_ATI2N
,
GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI
,
GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI
,
0
,
GL_LUMINANCE_ALPHA
,
GL_UNSIGNED_BYTE
,
0
,
...
...
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