vkd3d-shader/d3dbc: Split hlsl_sm1_write().

The idea is to start splitting the

    HLSL IR -> d3dbc

translation into

    HLSL IR -> vsir -> d3dbc

So hlsl_sm1_write is split into two functions, sm1_generate_vsir()
which should handle the first part and d3dbc_compile() which should
handle the second part.

This translation should be completed once the hlsl_ctx and entry_func
are no longer used in d3dbc_compile().
This commit is contained in:
Francisco Casas
2024-05-17 18:30:59 -04:00
committed by Henri Verbeet
parent 6db2bc3eff
commit 130b3335cb
Notes: Henri Verbeet 2024-07-09 21:08:22 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/877
3 changed files with 47 additions and 3 deletions

View File

@@ -2779,7 +2779,14 @@ static void write_sm1_block(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *
}
}
int hlsl_sm1_write(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func, struct vkd3d_shader_code *out)
/* OBJECTIVE: Stop relying on ctx and entry_func on this function, receiving
* data from the other parameters instead, so it can be removed as an argument
* and be declared in vkd3d_shader_private.h and used without relying on HLSL
* IR structs. */
int d3dbc_compile(struct vsir_program *program, uint64_t config_flags,
const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context,
struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func)
{
struct vkd3d_bytecode_buffer buffer = {0};