d3d10/effect: Use correct vertex shader element when returning input signature.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d515387005
commit
7b6918f680
|
@ -3710,7 +3710,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
|
||||||
D3D10_PASS_DESC *desc)
|
D3D10_PASS_DESC *desc)
|
||||||
{
|
{
|
||||||
struct d3d10_effect_pass *pass = impl_from_ID3D10EffectPass(iface);
|
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);
|
TRACE("iface %p, desc %p.\n", iface, desc);
|
||||||
|
|
||||||
|
@ -3726,14 +3727,15 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_pass_GetDesc(ID3D10EffectPass *ifa
|
||||||
return E_INVALIDARG;
|
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->Name = pass->name;
|
||||||
desc->Annotations = pass->annotations.count;
|
desc->Annotations = pass->annotations.count;
|
||||||
if (s->input_signature)
|
if (input_signature)
|
||||||
{
|
{
|
||||||
desc->pIAInputSignature = ID3D10Blob_GetBufferPointer(s->input_signature);
|
desc->pIAInputSignature = ID3D10Blob_GetBufferPointer(input_signature);
|
||||||
desc->IAInputSignatureSize = ID3D10Blob_GetBufferSize(s->input_signature);
|
desc->IAInputSignatureSize = ID3D10Blob_GetBufferSize(input_signature);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2913,6 +2913,7 @@ static void test_effect_local_shader(void)
|
||||||
D3D10_EFFECT_SHADER_DESC shaderdesc;
|
D3D10_EFFECT_SHADER_DESC shaderdesc;
|
||||||
D3D10_SIGNATURE_PARAMETER_DESC sign;
|
D3D10_SIGNATURE_PARAMETER_DESC sign;
|
||||||
D3D10_STATE_BLOCK_MASK mask;
|
D3D10_STATE_BLOCK_MASK mask;
|
||||||
|
D3D10_PASS_DESC pass_desc;
|
||||||
ID3D10Device *device;
|
ID3D10Device *device;
|
||||||
ULONG refcount;
|
ULONG refcount;
|
||||||
|
|
||||||
|
@ -3611,6 +3612,12 @@ if (0)
|
||||||
ok(typedesc.UnpackedSize == 0x0, "UnpackedSize is %#x, expected 0x0\n", typedesc.UnpackedSize);
|
ok(typedesc.UnpackedSize == 0x0, "UnpackedSize is %#x, expected 0x0\n", typedesc.UnpackedSize);
|
||||||
ok(typedesc.Stride == 0x0, "Stride is %#x, expected 0x0\n", typedesc.Stride);
|
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 */
|
/* pass 6 pixelshader */
|
||||||
hr = p->lpVtbl->GetPixelShaderDesc(p, &pdesc);
|
hr = p->lpVtbl->GetPixelShaderDesc(p, &pdesc);
|
||||||
ok(hr == S_OK, "GetPixelShaderDesc got %x, expected %x\n", hr, S_OK);
|
ok(hr == S_OK, "GetPixelShaderDesc got %x, expected %x\n", hr, S_OK);
|
||||||
|
|
Loading…
Reference in New Issue