Commit 72046ad7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d11: Always initialize out shader pointer in CreateDomainShader().

parent 1a869de1
......@@ -3592,6 +3592,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDomainShader(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");
......
......@@ -4824,6 +4824,7 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ID3D11Device *device, *tmp;
ID3D11GeometryShader *gs;
ID3D11VertexShader *vs;
ID3D11DomainShader *ds;
ID3D11PixelShader *ps;
ID3D11HullShader *hs;
HRESULT hr;
......@@ -5007,6 +5008,12 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!hs, "Unexpected pointer %p.\n", hs);
/* Domain shader */
ds = (void *)0xdeadbeef;
hr = ID3D11Device_CreateDomainShader(device, gs_4_0, sizeof(gs_4_0), NULL, &ds);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!ds, "Unexpected pointer %p.\n", ds);
refcount = ID3D11Device_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment