d3d10: Implement D3D10StateBlockMaskDisableAll().

This commit is contained in:
Henri Verbeet 2011-11-15 21:18:24 +01:00 committed by Alexandre Julliard
parent 73b9dc98eb
commit 88a55a04a3
4 changed files with 22 additions and 1 deletions

View File

@ -20,7 +20,7 @@
@ stdcall D3D10ReflectShader(ptr long ptr) @ stdcall D3D10ReflectShader(ptr long ptr)
@ stub D3D10RegisterLayers @ stub D3D10RegisterLayers
@ stdcall D3D10StateBlockMaskDifference(ptr ptr ptr) @ stdcall D3D10StateBlockMaskDifference(ptr ptr ptr)
@ stub D3D10StateBlockMaskDisableAll @ stdcall D3D10StateBlockMaskDisableAll(ptr)
@ stub D3D10StateBlockMaskDisableCapture @ stub D3D10StateBlockMaskDisableCapture
@ stub D3D10StateBlockMaskEnableAll @ stub D3D10StateBlockMaskEnableAll
@ stub D3D10StateBlockMaskEnableCapture @ stub D3D10StateBlockMaskEnableCapture

View File

@ -166,3 +166,15 @@ HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x,
return S_OK; 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;
}

View File

@ -88,6 +88,14 @@ static void test_stateblock_mask(void)
ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr);
hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, NULL); hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, NULL);
ok(hr == E_INVALIDARG, "Got unexpect hr %#x.\n", hr); 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) START_TEST(device)

View File

@ -806,6 +806,7 @@ HRESULT WINAPI D3D10CreateStateBlock(ID3D10Device *device,
HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x, HRESULT WINAPI D3D10StateBlockMaskDifference(D3D10_STATE_BLOCK_MASK *mask_x,
D3D10_STATE_BLOCK_MASK *mask_y, D3D10_STATE_BLOCK_MASK *result); D3D10_STATE_BLOCK_MASK *mask_y, D3D10_STATE_BLOCK_MASK *result);
HRESULT WINAPI D3D10StateBlockMaskDisableAll(D3D10_STATE_BLOCK_MASK *mask);
#ifdef __cplusplus #ifdef __cplusplus
} }