Henri Verbeet : d3d10: Implement D3D10StateBlockMaskEnableAll().
Alexandre Julliard
julliard at winehq.org
Wed Nov 16 12:46:44 CST 2011
Module: wine
Branch: master
Commit: be7122034fa1d9a0e58fce9f468ec97b14f28c13
URL: http://source.winehq.org/git/wine.git/?a=commit;h=be7122034fa1d9a0e58fce9f468ec97b14f28c13
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Nov 15 21:18:26 2011 +0100
d3d10: Implement D3D10StateBlockMaskEnableAll().
---
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 bf3d64c..7fd2aa2 100644
--- a/dlls/d3d10/stateblock.c
+++ b/dlls/d3d10/stateblock.c
@@ -284,3 +284,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 c29f65b..894fd1d 100644
--- a/dlls/d3d10/tests/device.c
+++ b/dlls/d3d10/tests/device.c
@@ -123,6 +123,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
}
More information about the wine-cvs
mailing list