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
e1601622
Commit
e1601622
authored
Nov 03, 2014
by
Matteo Bruni
Committed by
Alexandre Julliard
Nov 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Add an ATI1N entry to the test_volume_blocks test.
parent
d690aaee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
13 deletions
+26
-13
device.c
dlls/d3d8/tests/device.c
+26
-13
No files found.
dlls/d3d8/tests/device.c
View file @
e1601622
...
...
@@ -5255,25 +5255,28 @@ static void test_volume_blocks(void)
unsigned
int
block_height
;
unsigned
int
block_depth
;
unsigned
int
block_size
;
BOOL
broken
;
unsigned
int
broken
;
BOOL
create_size_checked
,
core_fmt
;
}
formats
[]
=
{
/* Scratch volumes enforce DXTn block locks, unlike their surface counterparts.
* ATI2N and YUV blocks are not enforced on any tested card (r200, gtx 460). */
{
D3DFMT_DXT1
,
"D3DFMT_DXT1"
,
4
,
4
,
1
,
8
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT2
,
"D3DFMT_DXT2"
,
4
,
4
,
1
,
16
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT3
,
"D3DFMT_DXT3"
,
4
,
4
,
1
,
16
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT4
,
"D3DFMT_DXT4"
,
4
,
4
,
1
,
16
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT5
,
"D3DFMT_DXT5"
,
4
,
4
,
1
,
16
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT5
,
"D3DFMT_DXT5"
,
4
,
4
,
1
,
16
,
FALSE
,
TRUE
,
TRUE
},
{
D3DFMT_DXT1
,
"D3DFMT_DXT1"
,
4
,
4
,
1
,
8
,
0
,
TRUE
,
TRUE
},
{
D3DFMT_DXT2
,
"D3DFMT_DXT2"
,
4
,
4
,
1
,
16
,
0
,
TRUE
,
TRUE
},
{
D3DFMT_DXT3
,
"D3DFMT_DXT3"
,
4
,
4
,
1
,
16
,
0
,
TRUE
,
TRUE
},
{
D3DFMT_DXT4
,
"D3DFMT_DXT4"
,
4
,
4
,
1
,
16
,
0
,
TRUE
,
TRUE
},
{
D3DFMT_DXT5
,
"D3DFMT_DXT5"
,
4
,
4
,
1
,
16
,
0
,
TRUE
,
TRUE
},
{
D3DFMT_DXT5
,
"D3DFMT_DXT5"
,
4
,
4
,
1
,
16
,
0
,
TRUE
,
TRUE
},
/* ATI2N has 2x2 blocks on all AMD cards and Geforce 7 cards,
* which doesn't match the format spec. On newer Nvidia cards
* it has the correct 4x4 block size */
{
MAKEFOURCC
(
'A'
,
'T'
,
'I'
,
'2'
),
"ATI2N"
,
4
,
4
,
1
,
16
,
TRUE
,
FALSE
,
FALSE
},
{
D3DFMT_YUY2
,
"D3DFMT_YUY2"
,
2
,
1
,
1
,
4
,
TRUE
,
FALSE
,
TRUE
},
{
D3DFMT_UYVY
,
"D3DFMT_UYVY"
,
2
,
1
,
1
,
4
,
TRUE
,
FALSE
,
TRUE
},
* it has the correct 4x4 block size.
* ATI1N volume textures are only supported by AMD GPUs right
* now and locking offsets seem just wrong. */
{
MAKEFOURCC
(
'A'
,
'T'
,
'I'
,
'1'
),
"ATI1N"
,
4
,
4
,
1
,
8
,
2
,
FALSE
,
FALSE
},
{
MAKEFOURCC
(
'A'
,
'T'
,
'I'
,
'2'
),
"ATI2N"
,
4
,
4
,
1
,
16
,
1
,
FALSE
,
FALSE
},
{
D3DFMT_YUY2
,
"D3DFMT_YUY2"
,
2
,
1
,
1
,
4
,
1
,
FALSE
,
TRUE
},
{
D3DFMT_UYVY
,
"D3DFMT_UYVY"
,
2
,
1
,
1
,
4
,
1
,
FALSE
,
TRUE
},
};
static
const
struct
{
...
...
@@ -5421,10 +5424,14 @@ static void test_volume_blocks(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock volume texture, hr %#x.
\n
"
,
hr
);
base
=
locked_box
.
pBits
;
if
(
formats
[
i
].
broken
)
if
(
formats
[
i
].
broken
==
1
)
{
expected_row_pitch
=
bytes_per_pixel
*
24
;
}
else
if
(
formats
[
i
].
broken
==
2
)
{
expected_row_pitch
=
24
;
}
else
{
expected_row_pitch
=
(
24
/* tex width */
+
formats
[
i
].
block_height
-
1
)
/
formats
[
i
].
block_width
...
...
@@ -5459,12 +5466,18 @@ static void test_volume_blocks(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to lock volume texture, hr %#x, j %u.
\n
"
,
hr
,
j
);
offset
=
(
BYTE
*
)
locked_box
.
pBits
-
base
;
if
(
formats
[
i
].
broken
)
if
(
formats
[
i
].
broken
==
1
)
{
expected_offset
=
box
.
Front
*
expected_slice_pitch
+
box
.
Top
*
expected_row_pitch
+
box
.
Left
*
bytes_per_pixel
;
}
else
if
(
formats
[
i
].
broken
==
2
)
{
expected_offset
=
box
.
Front
*
expected_slice_pitch
+
box
.
Top
*
expected_row_pitch
+
box
.
Left
;
}
else
{
expected_offset
=
(
box
.
Front
/
formats
[
i
].
block_depth
)
*
expected_slice_pitch
...
...
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