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
a11a1713
Commit
a11a1713
authored
Nov 14, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Implement D3D10StateBlockMaskDifference().
parent
84f90f6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
1 deletion
+54
-1
d3d10.spec
dlls/d3d10/d3d10.spec
+1
-1
stateblock.c
dlls/d3d10/stateblock.c
+23
-0
device.c
dlls/d3d10/tests/device.c
+27
-0
d3d10effect.h
include/d3d10effect.h
+3
-0
No files found.
dlls/d3d10/d3d10.spec
View file @
a11a1713
...
...
@@ -19,7 +19,7 @@
@ stub D3D10PreprocessShader
@ stdcall D3D10ReflectShader(ptr long ptr)
@ stub D3D10RegisterLayers
@ st
ub D3D10StateBlockMaskDifference
@ st
dcall D3D10StateBlockMaskDifference(ptr ptr ptr)
@ stub D3D10StateBlockMaskDisableAll
@ stub D3D10StateBlockMaskDisableCapture
@ stub D3D10StateBlockMaskEnableAll
...
...
dlls/d3d10/stateblock.c
View file @
a11a1713
...
...
@@ -143,3 +143,26 @@ HRESULT WINAPI D3D10CreateStateBlock(ID3D10Device *device,
return
S_OK
;
}
HRESULT
WINAPI
D3D10StateBlockMaskDifference
(
D3D10_STATE_BLOCK_MASK
*
mask_x
,
D3D10_STATE_BLOCK_MASK
*
mask_y
,
D3D10_STATE_BLOCK_MASK
*
result
)
{
UINT
count
=
sizeof
(
*
result
)
/
sizeof
(
DWORD
);
UINT
i
;
TRACE
(
"mask_x %p, mask_y %p, result %p.
\n
"
,
mask_x
,
mask_y
,
result
);
if
(
!
mask_x
||
!
mask_y
||
!
result
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
count
;
++
i
)
{
((
DWORD
*
)
result
)[
i
]
=
((
DWORD
*
)
mask_x
)[
i
]
^
((
DWORD
*
)
mask_y
)[
i
];
}
for
(
i
=
count
*
sizeof
(
DWORD
);
i
<
sizeof
(
*
result
);
++
i
)
{
((
BYTE
*
)
result
)[
i
]
=
((
BYTE
*
)
mask_x
)[
i
]
^
((
BYTE
*
)
mask_y
)[
i
];
}
return
S_OK
;
}
dlls/d3d10/tests/device.c
View file @
a11a1713
...
...
@@ -64,6 +64,32 @@ static void test_device_interfaces(ID3D10Device *device)
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIDevice (%#x)
\n
"
,
hr
);
}
static
void
test_stateblock_mask
(
void
)
{
D3D10_STATE_BLOCK_MASK
mask_x
,
mask_y
,
result
;
HRESULT
hr
;
memset
(
&
mask_x
,
0
,
sizeof
(
mask_x
));
memset
(
&
mask_y
,
0
,
sizeof
(
mask_y
));
memset
(
&
result
,
0
,
sizeof
(
result
));
mask_x
.
VS
=
0x33
;
mask_y
.
VS
=
0x55
;
mask_x
.
Predication
=
0x99
;
mask_y
.
Predication
=
0xaa
;
hr
=
D3D10StateBlockMaskDifference
(
&
mask_x
,
&
mask_y
,
&
result
);
ok
(
SUCCEEDED
(
hr
),
"D3D10StateBlockMaskDifference failed, hr %#x.
\n
"
,
hr
);
ok
(
result
.
VS
==
0x66
,
"Got unexpected result.VS %#x.
\n
"
,
result
.
VS
);
ok
(
result
.
Predication
==
0x33
,
"Got unexpected result.Predication %#x.
\n
"
,
result
.
Predication
);
hr
=
D3D10StateBlockMaskDifference
(
NULL
,
&
mask_y
,
&
result
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpect hr %#x.
\n
"
,
hr
);
hr
=
D3D10StateBlockMaskDifference
(
&
mask_x
,
NULL
,
&
result
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpect hr %#x.
\n
"
,
hr
);
hr
=
D3D10StateBlockMaskDifference
(
&
mask_x
,
&
mask_y
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpect hr %#x.
\n
"
,
hr
);
}
START_TEST
(
device
)
{
ID3D10Device
*
device
;
...
...
@@ -77,6 +103,7 @@ START_TEST(device)
}
test_device_interfaces
(
device
);
test_stateblock_mask
();
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
...
...
include/d3d10effect.h
View file @
a11a1713
...
...
@@ -804,6 +804,9 @@ HRESULT WINAPI D3D10CreateEffectFromMemory(void *data, SIZE_T data_size, UINT fl
HRESULT
WINAPI
D3D10CreateStateBlock
(
ID3D10Device
*
device
,
D3D10_STATE_BLOCK_MASK
*
mask
,
ID3D10StateBlock
**
stateblock
);
HRESULT
WINAPI
D3D10StateBlockMaskDifference
(
D3D10_STATE_BLOCK_MASK
*
mask_x
,
D3D10_STATE_BLOCK_MASK
*
mask_y
,
D3D10_STATE_BLOCK_MASK
*
result
);
#ifdef __cplusplus
}
#endif
...
...
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