diff --git a/dlls/d3d10/d3d10.spec b/dlls/d3d10/d3d10.spec index baa0c10d0b3..1a09f4a056e 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 f121a5c495a..76a27f92b61 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 1fc3a3bc6cb..21970027875 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 d36c3dad4c2..e293d3bd650 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 }