mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/fx: Introduce a parser/disassembler.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
cd249a47b8
commit
6801ad9b7a
Notes:
Henri Verbeet
2024-10-14 15:45:40 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1153
@@ -1710,6 +1710,10 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
|
||||
{
|
||||
ret = compile_hlsl(compile_info, out, &message_context);
|
||||
}
|
||||
else if (compile_info->source_type == VKD3D_SHADER_SOURCE_FX)
|
||||
{
|
||||
ret = fx_parse(compile_info, out, &message_context);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint64_t config_flags = vkd3d_shader_init_config_flags();
|
||||
@@ -1942,6 +1946,7 @@ const enum vkd3d_shader_source_type *vkd3d_shader_get_supported_source_types(uns
|
||||
#ifdef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||
VKD3D_SHADER_SOURCE_DXBC_DXIL,
|
||||
#endif
|
||||
VKD3D_SHADER_SOURCE_FX,
|
||||
};
|
||||
|
||||
TRACE("count %p.\n", count);
|
||||
@@ -2000,6 +2005,11 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
};
|
||||
#endif
|
||||
|
||||
static const enum vkd3d_shader_target_type fx_types[] =
|
||||
{
|
||||
VKD3D_SHADER_TARGET_D3D_ASM,
|
||||
};
|
||||
|
||||
TRACE("source_type %#x, count %p.\n", source_type, count);
|
||||
|
||||
switch (source_type)
|
||||
@@ -2022,6 +2032,10 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
return dxbc_dxil_types;
|
||||
#endif
|
||||
|
||||
case VKD3D_SHADER_SOURCE_FX:
|
||||
*count = ARRAY_SIZE(fx_types);
|
||||
return fx_types;
|
||||
|
||||
default:
|
||||
*count = 0;
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user