[PATCH 1/5] d3d10: Implement D3D10StateBlockMaskDisableAll().
Henri Verbeet
hverbeet at codeweavers.com
Tue Nov 15 14:18:24 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 baa0c10..1a09f4a 100644
--- a/dlls/d3d10/d3d10.spec
+++ b/dlls/d3d10/d3d10.spec
@@ -20,7 +20,7 @@
@ stdcall D3D10ReflectShader(ptr long ptr)
@ stub D3D10RegisterLayers
@ stdcall D3D10StateBlockMaskDifference(ptr ptr ptr)
-@ stub D3D10StateBlockMaskDisableAll
+@ stdcall D3D10StateBlockMaskDisableAll(ptr)
@ stub D3D10StateBlockMaskDisableCapture
@ stub D3D10StateBlockMaskEnableAll
@ stub D3D10StateBlockMaskEnableCapture
diff --git a/dlls/d3d10/stateblock.c b/dlls/d3d10/stateblock.c
index f121a5c..76a27f9 100644
--- a/dlls/d3d10/stateblock.c
+++ b/dlls/d3d10/stateblock.c
@@ -166,3 +166,15 @@ HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x,
return S_OK;
}
+
+HRESULT WINAPI D3D10StateBlockMaskDisableAll(D3D10_STATE_BLOCK_MASK *mask)
+{
+ TRACE("mask %p.\n", mask);
+
+ if (!mask)
+ return E_INVALIDARG;
+
+ memset(mask, 0, sizeof(*mask));
+
+ return S_OK;
+}
diff --git a/dlls/d3d10/tests/device.c b/dlls/d3d10/tests/device.c
index 1fc3a3b..2197002 100644
--- a/dlls/d3d10/tests/device.c
+++ b/dlls/d3d10/tests/device.c
@@ -88,6 +88,14 @@ static void test_stateblock_mask(void)
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);
+
+ memset(&result, 0xff, sizeof(result));
+ hr = D3D10StateBlockMaskDisableAll(&result);
+ ok(SUCCEEDED(hr), "D3D10StateBlockMaskDisableAll failed, hr %#x.\n", hr);
+ ok(!result.VS, "Got unexpected result.VS %#x.\n", result.VS);
+ ok(!result.Predication, "Got unexpected result.Predication %#x.\n", result.Predication);
+ hr = D3D10StateBlockMaskDisableAll(NULL);
+ ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
}
START_TEST(device)
diff --git a/include/d3d10effect.h b/include/d3d10effect.h
index d36c3da..e293d3b 100644
--- a/include/d3d10effect.h
+++ b/include/d3d10effect.h
@@ -806,6 +806,7 @@ HRESULT WINAPI D3D10CreateStateBlock(ID3D10Device *device,
HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x,
D3D10_STATE_BLOCK_MASK *mask_y, D3D10_STATE_BLOCK_MASK *result);
+HRESULT WINAPI D3D10StateBlockMaskDisableAll(D3D10_STATE_BLOCK_MASK *mask);
#ifdef __cplusplus
}
--
1.7.3.4
More information about the wine-patches
mailing list