mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/tpf: Propagate validation errors after parsing.
Also, trace the program when validation fails after parsing, mostly to make debugging easier.
This commit is contained in:
parent
0f91149260
commit
8acaa3a62c
Notes:
Henri Verbeet
2024-09-30 21:06:59 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1130
@ -2947,9 +2947,6 @@ int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t con
|
|||||||
&& !sm4.has_control_point_phase && !sm4.p.failed)
|
&& !sm4.has_control_point_phase && !sm4.p.failed)
|
||||||
shader_sm4_validate_default_phase_index_ranges(&sm4);
|
shader_sm4_validate_default_phase_index_ranges(&sm4);
|
||||||
|
|
||||||
if (!sm4.p.failed)
|
|
||||||
vkd3d_shader_parser_validate(&sm4.p, config_flags);
|
|
||||||
|
|
||||||
if (sm4.p.failed)
|
if (sm4.p.failed)
|
||||||
{
|
{
|
||||||
WARN("Failed to parse shader.\n");
|
WARN("Failed to parse shader.\n");
|
||||||
@ -2957,6 +2954,17 @@ int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t con
|
|||||||
return VKD3D_ERROR_INVALID_SHADER;
|
return VKD3D_ERROR_INVALID_SHADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ret = vkd3d_shader_parser_validate(&sm4.p, config_flags)) < 0)
|
||||||
|
{
|
||||||
|
WARN("Failed to validate shader after parsing, ret %d.\n", ret);
|
||||||
|
|
||||||
|
if (TRACE_ON())
|
||||||
|
vkd3d_shader_trace(program);
|
||||||
|
|
||||||
|
vsir_program_cleanup(program);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
return VKD3D_OK;
|
return VKD3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user