[PATCH 3/5] d3d10: Implement D3D10StateBlockMaskEnableAll().
Henri Verbeet
hverbeet at codeweavers.com
Tue Nov 15 14:18:26 CST 2011
---
dlls/d3d10/d3d10.spec | 2 +-
dlls/d3d10/stateblock.c | 12 ++++++++++++
dlls/d3d10/tests/device.c | 8 ++++++++
include/d3d10effect.h | 1 +
4 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d10/d3d10.spec b/dlls/d3d10/d3d10.spec
index 49733de..865ded5 100644
--- a/dlls/d3d10/d3d10.spec
+++ b/dlls/d3d10/d3d10.spec
@@ -22,7 +22,7 @@
@ stdcall D3D10StateBlockMaskDifference(ptr ptr ptr)
@ stdcall D3D10StateBlockMaskDisableAll(ptr)
@ stdcall D3D10StateBlockMaskDisableCapture(ptr long long long)
-@ stub D3D10StateBlockMaskEnableAll
+@ stdcall D3D10StateBlockMaskEnableAll(ptr)
@ stub D3D10StateBlockMaskEnableCapture
@ stub D3D10StateBlockMaskGetSetting
@ stub D3D10StateBlockMaskIntersect
diff --git a/dlls/d3d10/stateblock.c b/dlls/d3d10/stateblock.c
index a0171a6..93835b3 100644
--- a/dlls/d3d10/stateblock.c
+++ b/dlls/d3d10/stateblock.c
@@ -275,3 +275,15 @@ HRESULT WINAPI D3D10StateBlockMaskDisableCapture(D3D10_STATE_BLOCK_MASK *mask,
return E_INVALIDARG;
}
}
+
+HRESULT WINAPI D3D10StateBlockMaskEnableAll(D3D10_STATE_BLOCK_MASK *mask)
+{
+ TRACE("mask %p.\n", mask);
+
+ if (!mask)
+ return E_INVALIDARG;
+
+ memset(mask, 0xff, sizeof(*mask));
+
+ return S_OK;
+}
diff --git a/dlls/d3d10/tests/device.c b/dlls/d3d10/tests/device.c
index 0e843c4..ec2bbcf 100644
--- a/dlls/d3d10/tests/device.c
+++ b/dlls/d3d10/tests/device.c
@@ -115,6 +115,14 @@ static void test_stateblock_mask(void)
hr = D3D10StateBlockMaskDisableAll(NULL);
ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
+ memset(&result, 0, sizeof(result));
+ hr = D3D10StateBlockMaskEnableAll(&result);
+ ok(SUCCEEDED(hr), "D3D10StateBlockMaskEnableAll failed, hr %#x.\n", hr);
+ ok(result.VS == 0xff, "Got unexpected result.VS %#x.\n", result.VS);
+ ok(result.Predication == 0xff, "Got unexpected result.Predication %#x.\n", result.Predication);
+ hr = D3D10StateBlockMaskEnableAll(NULL);
+ ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
+
result.VS = 0xff;
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 0, 1);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskDisableCapture failed, hr %#x.\n", hr);
diff --git a/include/d3d10effect.h b/include/d3d10effect.h
index b195dff..697d1c4 100644
--- a/include/d3d10effect.h
+++ b/include/d3d10effect.h
@@ -837,6 +837,7 @@ HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x,
HRESULT WINAPI D3D10StateBlockMaskDisableAll(D3D10_STATE_BLOCK_MASK *mask);
HRESULT WINAPI D3D10StateBlockMaskDisableCapture(D3D10_STATE_BLOCK_MASK *mask,
D3D10_DEVICE_STATE_TYPES state_type, UINT start_idx, UINT count);
+HRESULT WINAPI D3D10StateBlockMaskEnableAll(D3D10_STATE_BLOCK_MASK *mask);
#ifdef __cplusplus
}
--
1.7.3.4
More information about the wine-patches
mailing list