Commit 1a869de1 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 3dd9a78a
......@@ -3569,6 +3569,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateHullShader(ID3D11Device2 *if
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");
......
......@@ -4825,6 +4825,7 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ID3D11GeometryShader *gs;
ID3D11VertexShader *vs;
ID3D11PixelShader *ps;
ID3D11HullShader *hs;
HRESULT hr;
device_desc.feature_level = &feature_level;
......@@ -5000,6 +5001,12 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ID3D11GeometryShader_Release(gs);
}
/* Hull shader */
hs = (void *)0xdeadbeef;
hr = ID3D11Device_CreateHullShader(device, gs_4_0, sizeof(gs_4_0), NULL, &hs);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!hs, "Unexpected pointer %p.\n", hs);
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