mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/d3dbc: Do not fail parsing the shader when undeclared inputs are encountered.
These can be disassembled by D3DDisassemble() just fine, and perhaps more importantly, shader model 1 vertex shaders do not require dcl_ instructions in Direct3D 8.
This commit is contained in:
parent
8c6f5b847b
commit
fef30dac2c
Notes:
Alexandre Julliard
2024-01-29 22:53:26 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/610
@ -587,7 +587,7 @@ static void add_signature_mask(struct vkd3d_shader_sm1_parser *sm1, bool output,
|
|||||||
|
|
||||||
if (!(element = find_signature_element_by_register_index(signature, register_index)))
|
if (!(element = find_signature_element_by_register_index(signature, register_index)))
|
||||||
{
|
{
|
||||||
vkd3d_shader_parser_error(&sm1->p, VKD3D_SHADER_ERROR_D3DBC_UNDECLARED_SEMANTIC,
|
vkd3d_shader_parser_warning(&sm1->p, VKD3D_SHADER_ERROR_D3DBC_UNDECLARED_SEMANTIC,
|
||||||
"%s register %u was used without being declared.", output ? "Output" : "Input", register_index);
|
"%s register %u was used without being declared.", output ? "Output" : "Input", register_index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1583,8 +1583,7 @@ static void test_disassemble_shader(void)
|
|||||||
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = D3DDisassemble(vs_1_1, sizeof(vs_1_1), 0, NULL, &blob);
|
hr = D3DDisassemble(vs_1_1, sizeof(vs_1_1), 0, NULL, &blob);
|
||||||
todo ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
ID3D10Blob_Release(blob);
|
ID3D10Blob_Release(blob);
|
||||||
|
|
||||||
hr = D3DDisassemble(vs_2_0, sizeof(vs_2_0), 0, NULL, &blob);
|
hr = D3DDisassemble(vs_2_0, sizeof(vs_2_0), 0, NULL, &blob);
|
||||||
@ -1592,8 +1591,7 @@ static void test_disassemble_shader(void)
|
|||||||
ID3D10Blob_Release(blob);
|
ID3D10Blob_Release(blob);
|
||||||
|
|
||||||
hr = D3DDisassemble(vs_3_0, sizeof(vs_3_0), 0, NULL, &blob);
|
hr = D3DDisassemble(vs_3_0, sizeof(vs_3_0), 0, NULL, &blob);
|
||||||
todo ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
ID3D10Blob_Release(blob);
|
ID3D10Blob_Release(blob);
|
||||||
|
|
||||||
hr = D3DDisassemble(vs_4_0, sizeof(vs_4_0), 0, NULL, &blob);
|
hr = D3DDisassemble(vs_4_0, sizeof(vs_4_0), 0, NULL, &blob);
|
||||||
|
Loading…
Reference in New Issue
Block a user