d3d10/effect: Set corresponding variable flag when explicit bind point is specified for a constant buffer.
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
e5e6000654
commit
86194bff11
|
@ -2502,6 +2502,9 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (l->explicit_bind_point != ~0u)
|
||||||
|
l->flag |= D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,30 +56,23 @@ static inline HRESULT create_effect(DWORD *data, UINT flags, ID3D10Device *devic
|
||||||
* test_effect_constant_buffer_type
|
* test_effect_constant_buffer_type
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
cbuffer cb
|
cbuffer cb : register(b1)
|
||||||
{
|
{
|
||||||
float f1 : SV_POSITION;
|
float f1 : SV_POSITION;
|
||||||
float f2 : COLOR0;
|
float f2 : COLOR0;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
static DWORD fx_test_ecbt[] = {
|
static DWORD fx_test_ecbt[] =
|
||||||
0x43425844, 0xc92a4732, 0xbd0d68c0, 0x877f71ee,
|
{
|
||||||
0x871fc277, 0x00000001, 0x0000010a, 0x00000001,
|
0x43425844, 0xa2e18995, 0x540597cc, 0x670b9d73, 0x777fe190, 0x00000001, 0x0000010a, 0x00000001,
|
||||||
0x00000024, 0x30315846, 0x000000de, 0xfeff1001,
|
0x00000024, 0x30315846, 0x000000de, 0xfeff1001, 0x00000001, 0x00000002, 0x00000000, 0x00000000,
|
||||||
0x00000001, 0x00000002, 0x00000000, 0x00000000,
|
0x00000000, 0x00000000, 0x00000000, 0x00000042, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000042,
|
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x66006263,
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
0x74616f6c, 0x00000700, 0x00000100, 0x00000000, 0x00000400, 0x00001000, 0x00000400, 0x00090900,
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
0x00316600, 0x505f5653, 0x5449534f, 0x004e4f49, 0x43003266, 0x524f4c4f, 0x00040030, 0x00100000,
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x66006263,
|
0x00000000, 0x00020000, 0x00010000, 0x00000000, 0x00290000, 0x000d0000, 0x002c0000, 0x00000000,
|
||||||
0x74616f6c, 0x00000700, 0x00000100, 0x00000000,
|
0x00000000, 0x00000000, 0x00000000, 0x00380000, 0x000d0000, 0x003b0000, 0x00040000, 0x00000000,
|
||||||
0x00000400, 0x00001000, 0x00000400, 0x00090900,
|
0x00000000, 0x00000000, 0x00000000,
|
||||||
0x00316600, 0x505f5653, 0x5449534f, 0x004e4f49,
|
|
||||||
0x43003266, 0x524f4c4f, 0x00040030, 0x00100000,
|
|
||||||
0x00000000, 0x00020000, 0xffff0000, 0x0000ffff,
|
|
||||||
0x00290000, 0x000d0000, 0x002c0000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00380000,
|
|
||||||
0x000d0000, 0x003b0000, 0x00040000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x52590000,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void test_effect_constant_buffer_type(void)
|
static void test_effect_constant_buffer_type(void)
|
||||||
|
@ -87,6 +80,7 @@ static void test_effect_constant_buffer_type(void)
|
||||||
ID3D10Effect *effect;
|
ID3D10Effect *effect;
|
||||||
ID3D10EffectConstantBuffer *constantbuffer;
|
ID3D10EffectConstantBuffer *constantbuffer;
|
||||||
ID3D10EffectType *type, *type2, *null_type;
|
ID3D10EffectType *type, *type2, *null_type;
|
||||||
|
D3D10_EFFECT_VARIABLE_DESC var_desc;
|
||||||
D3D10_EFFECT_TYPE_DESC type_desc;
|
D3D10_EFFECT_TYPE_DESC type_desc;
|
||||||
D3D10_EFFECT_DESC desc;
|
D3D10_EFFECT_DESC desc;
|
||||||
ID3D10Device *device;
|
ID3D10Device *device;
|
||||||
|
@ -119,6 +113,13 @@ static void test_effect_constant_buffer_type(void)
|
||||||
ok(desc.Techniques == 0, "Unexpected techniques count %u.\n", desc.Techniques);
|
ok(desc.Techniques == 0, "Unexpected techniques count %u.\n", desc.Techniques);
|
||||||
|
|
||||||
constantbuffer = effect->lpVtbl->GetConstantBufferByIndex(effect, 0);
|
constantbuffer = effect->lpVtbl->GetConstantBufferByIndex(effect, 0);
|
||||||
|
|
||||||
|
hr = constantbuffer->lpVtbl->GetDesc(constantbuffer, &var_desc);
|
||||||
|
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||||
|
ok(var_desc.Flags == D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT, "Unexpected variable flags %#x.\n", var_desc.Flags);
|
||||||
|
todo_wine
|
||||||
|
ok(var_desc.ExplicitBindPoint == 1, "Unexpected bind point %#x.\n", var_desc.ExplicitBindPoint);
|
||||||
|
|
||||||
type = constantbuffer->lpVtbl->GetType(constantbuffer);
|
type = constantbuffer->lpVtbl->GetType(constantbuffer);
|
||||||
|
|
||||||
hr = type->lpVtbl->GetDesc(type, &type_desc);
|
hr = type->lpVtbl->GetDesc(type, &type_desc);
|
||||||
|
|
Loading…
Reference in New Issue