Commit 7d7d1662 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 72046ad7
......@@ -3615,6 +3615,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateComputeShader(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");
......
......@@ -4823,6 +4823,7 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
struct device_desc device_desc;
ID3D11Device *device, *tmp;
ID3D11GeometryShader *gs;
ID3D11ComputeShader *cs;
ID3D11VertexShader *vs;
ID3D11DomainShader *ds;
ID3D11PixelShader *ps;
......@@ -5014,6 +5015,12 @@ static void test_create_shader(const D3D_FEATURE_LEVEL feature_level)
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!ds, "Unexpected pointer %p.\n", ds);
/* Compute shader */
ds = (void *)0xdeadbeef;
hr = ID3D11Device_CreateComputeShader(device, gs_4_0, sizeof(gs_4_0), NULL, &cs);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!cs, "Unexpected pointer %p.\n", cs);
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