From: Lucian Poston Subject: [PATCH 1/2] d3d11: Test shader class instance count Message-Id: <20171123175850.9665-1-lucian.poston@gmail.com> Date: Thu, 23 Nov 2017 09:58:49 -0800 https://bugs.winehq.org/show_bug.cgi?id=44052 Signed-off-by: Lucian Poston --- dlls/d3d11/tests/d3d11.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 59f2e6ef9f..615d7c1096 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -8622,7 +8622,7 @@ static void test_clear_state(void) UINT sample_mask; UINT stencil_ref; ULONG refcount; - UINT count, i; + UINT count, i, instance_count; HRESULT hr; device_desc.feature_level = &feature_level; @@ -8653,8 +8653,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, &instance_count); ok(!tmp_vs, "Got unexpected vertex shader %p.\n", tmp_vs); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_HSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); @@ -8672,8 +8675,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, &instance_count); ok(!tmp_hs, "Got unexpected hull shader %p.\n", tmp_hs); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_DSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); @@ -8691,8 +8697,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, &instance_count); ok(!tmp_ds, "Got unexpected domain shader %p.\n", tmp_ds); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_GSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); @@ -8710,8 +8719,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, &instance_count); ok(!tmp_gs, "Got unexpected geometry shader %p.\n", tmp_gs); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_PSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); @@ -8730,8 +8742,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, &instance_count); ok(!tmp_ps, "Got unexpected pixel shader %p.\n", tmp_ps); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_CSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); @@ -8750,8 +8765,11 @@ static void test_clear_state(void) { ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i); } - ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, 0); + instance_count = 100; + ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, &instance_count); ok(!tmp_cs, "Got unexpected compute shader %p.\n", tmp_cs); + todo_wine + ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count); ID3D11DeviceContext_CSGetUnorderedAccessViews(context, 0, D3D11_PS_CS_UAV_REGISTER_COUNT, tmp_uav); for (i = 0; i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i) { -- 2.13.6