From be7122034fa1d9a0e58fce9f468ec97b14f28c13 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 15 Nov 2011 21:18:26 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/dlls/d3d10/d3d10.spec b/dlls/d3d10/d3d10.spec index 49733deefa3..865ded51f28 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 bf3d64c5f0a..7fd2aa2319e 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 c29f65ba980..894fd1d3bcd 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 b195dff647b..697d1c476f3 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 }