From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d3d10core/tests/d3d10core.c | 6 ++++++ dlls/d3d11/device.c | 4 ++++ dlls/d3d11/tests/d3d11.c | 6 ++++++ 3 files changed, 16 insertions(+)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 3d8a5621a49..e292c27f7a1 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -15121,6 +15121,12 @@ float4 main(struct ps_data ps_input) : SV_Target
device = test_context.device;
+ /* Failing case */ + gs = (void *)0xdeadbeef; + hr = ID3D10Device_CreateGeometryShader(device, vs_code, sizeof(vs_code), &gs); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(!gs, "Unexpected pointer %p.\n", gs); + hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index c1207bf7bc9..396211561ff 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3492,6 +3492,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device2 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n", iface, byte_code, byte_code_length, class_linkage, shader);
+ *shader = NULL; + if (class_linkage) FIXME("Class linkage is not implemented yet.\n");
@@ -6198,6 +6200,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device1 TRACE("iface %p, byte_code %p, byte_code_length %Iu, shader %p.\n", iface, byte_code, byte_code_length, shader);
+ *shader = NULL; + if (FAILED(hr = d3d_geometry_shader_create(device, byte_code, byte_code_length, NULL, 0, NULL, 0, 0, &object))) return hr; diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 7ba39cc3447..2096e6d25c5 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -25526,6 +25526,12 @@ float4 main(struct ps_data ps_input) : SV_Target device = test_context.device; context = test_context.immediate_context;
+ /* Failing case */ + gs = (void *)0xdeadbeef; + hr = ID3D11Device_CreateGeometryShader(device, vs_code, sizeof(vs_code), NULL, &gs); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + ok(!gs, "Unexpected pointer %p.\n", gs); + hr = ID3D11Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), vs_code, sizeof(vs_code), &input_layout); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);