diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index a0ab21429f1..3b4050460a0 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -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 { diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 04cbcbc662b..76beb682fea 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -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);