mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Get rid of the "hlsl" argument to hlsl_compile_shader().
This commit is contained in:
Notes:
Henri Verbeet
2025-07-23 17:31:22 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1642
@@ -5011,8 +5011,8 @@ static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx)
|
||||
vkd3d_free(ctx->constant_defs.regs);
|
||||
}
|
||||
|
||||
int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context)
|
||||
int hlsl_compile_shader(const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_message_context *message_context, struct vkd3d_shader_code *out)
|
||||
{
|
||||
enum vkd3d_shader_target_type target_type = compile_info->target_type;
|
||||
const struct vkd3d_shader_hlsl_source_info *hlsl_source_info;
|
||||
@@ -5064,7 +5064,7 @@ int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d
|
||||
if (!hlsl_ctx_init(&ctx, compile_info, profile, message_context))
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if ((ret = hlsl_lexer_compile(&ctx, hlsl)) == 2)
|
||||
if ((ret = hlsl_lexer_compile(&ctx, &compile_info->source)) == 2)
|
||||
{
|
||||
hlsl_ctx_cleanup(&ctx);
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
|
@@ -1785,6 +1785,7 @@ static int compile_hlsl(const struct vkd3d_shader_compile_info *compile_info,
|
||||
const struct shader_dump_data *dump_data, struct vkd3d_shader_code *out,
|
||||
struct vkd3d_shader_message_context *message_context)
|
||||
{
|
||||
struct vkd3d_shader_compile_info preprocessed_info;
|
||||
struct vkd3d_shader_code preprocessed;
|
||||
int ret;
|
||||
|
||||
@@ -1793,7 +1794,9 @@ static int compile_hlsl(const struct vkd3d_shader_compile_info *compile_info,
|
||||
|
||||
vkd3d_shader_dump_shader(dump_data, preprocessed.code, preprocessed.size, SHADER_DUMP_TYPE_PREPROC);
|
||||
|
||||
ret = hlsl_compile_shader(&preprocessed, compile_info, out, message_context);
|
||||
preprocessed_info = *compile_info;
|
||||
preprocessed_info.source = preprocessed;
|
||||
ret = hlsl_compile_shader(&preprocessed_info, message_context, out);
|
||||
|
||||
vkd3d_shader_free_shader_code(&preprocessed);
|
||||
return ret;
|
||||
|
@@ -1799,8 +1799,8 @@ void vkd3d_compute_md5(const void *dxbc, size_t size, uint32_t checksum[4], enum
|
||||
int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context);
|
||||
|
||||
int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context);
|
||||
int hlsl_compile_shader(const struct vkd3d_shader_compile_info *compile_info,
|
||||
struct vkd3d_shader_message_context *message_context, struct vkd3d_shader_code *out);
|
||||
|
||||
static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_type( enum vsir_data_type data_type)
|
||||
{
|
||||
|
Reference in New Issue
Block a user