mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Import the HLSL compiler from Wine.
This corresponds to Wine commit 9f9fec18799bf59df6211b7294f8d338caa7f4db. Note that for the moment, compilation messages have not been ported. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
9d6be9530b
commit
b523122ef3
@@ -225,7 +225,7 @@ static void vkd3d_shader_dump_blob(const char *path, const char *prefix, const v
|
||||
}
|
||||
}
|
||||
|
||||
static void vkd3d_shader_dump_shader(enum vkd3d_shader_type type, const struct vkd3d_shader_code *shader)
|
||||
void vkd3d_shader_dump_shader(enum vkd3d_shader_type type, const struct vkd3d_shader_code *shader)
|
||||
{
|
||||
static bool enabled = true;
|
||||
const char *path;
|
||||
@@ -961,7 +961,16 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
||||
static int compile_hlsl(const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context)
|
||||
{
|
||||
return VKD3D_ERROR_NOT_IMPLEMENTED;
|
||||
struct vkd3d_shader_code preprocessed;
|
||||
int ret;
|
||||
|
||||
if ((ret = preproc_lexer_parse(compile_info, &preprocessed, message_context)))
|
||||
return ret;
|
||||
|
||||
ret = hlsl_compile_shader(preprocessed.code, compile_info, out, message_context);
|
||||
|
||||
vkd3d_shader_free_shader_code(&preprocessed);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
|
||||
|
||||
Reference in New Issue
Block a user