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

d3d10/effect: Use correct vertex shader element when returning input signature.

parent d5153870
......@@ -3710,7 +3710,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
D3D10_PASS_DESC *desc)
{
struct d3d10_effect_pass *pass = impl_from_ID3D10EffectPass(iface);
struct d3d10_effect_shader_variable *s;
struct d3d10_effect_variable *vs;
ID3D10Blob *input_signature;
TRACE("iface %p, desc %p.\n", iface, desc);
......@@ -3726,14 +3727,15 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
return E_INVALIDARG;
}
s = &pass->vs.shader->u.shader;
vs = d3d10_array_get_element(pass->vs.shader, pass->vs.index);
input_signature = vs->u.shader.input_signature;
desc->Name = pass->name;
desc->Annotations = pass->annotations.count;
if (s->input_signature)
if (input_signature)
{
desc->pIAInputSignature = ID3D10Blob_GetBufferPointer(s->input_signature);
desc->IAInputSignatureSize = ID3D10Blob_GetBufferSize(s->input_signature);
desc->pIAInputSignature = ID3D10Blob_GetBufferPointer(input_signature);
desc->IAInputSignatureSize = ID3D10Blob_GetBufferSize(input_signature);
}
else
{
......
......@@ -2913,6 +2913,7 @@ static void test_effect_local_shader(void)
D3D10_EFFECT_SHADER_DESC shaderdesc;
D3D10_SIGNATURE_PARAMETER_DESC sign;
D3D10_STATE_BLOCK_MASK mask;
D3D10_PASS_DESC pass_desc;
ID3D10Device *device;
ULONG refcount;
......@@ -3611,6 +3612,12 @@ if (0)
ok(typedesc.UnpackedSize == 0x0, "UnpackedSize is %#x, expected 0x0\n", typedesc.UnpackedSize);
ok(typedesc.Stride == 0x0, "Stride is %#x, expected 0x0\n", typedesc.Stride);
/* Get input signature from vertex shader set from array element. */
hr = p->lpVtbl->GetDesc(p, &pass_desc);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!!pass_desc.pIAInputSignature, "Expected input signature.\n");
ok(pass_desc.IAInputSignatureSize == 88, "Unexpected input signature size.\n");
/* pass 6 pixelshader */
hr = p->lpVtbl->GetPixelShaderDesc(p, &pdesc);
ok(hr == S_OK, "GetPixelShaderDesc got %x, expected %x\n", hr, S_OK);
......
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