mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Split hlsl_sm4_write().
Similarly to the already done split from HLSL IR -> d3dbc to HLSL IR -> vsir -> d3bc we now start splitting the HLSL IR -> tpf translation into HLSL IR -> vsir -> tpf So hlsl_sm4_write is split into two functions, sm4_generate_vsir() and tpf_compile(). This translation should be completed once tpf_compile() no longer needs the hlsl_ctx and entry_func parameters.
This commit is contained in:
committed by
Henri Verbeet
parent
3601397703
commit
5b21cc67f1
Notes:
Henri Verbeet
2024-10-16 21:46:52 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1152
@@ -1405,6 +1405,7 @@ struct sm4_stat
|
||||
|
||||
struct tpf_writer
|
||||
{
|
||||
/* OBJECTIVE: We want to get rid of this HLSL IR specific field. */
|
||||
struct hlsl_ctx *ctx;
|
||||
struct vkd3d_bytecode_buffer *buffer;
|
||||
struct vkd3d_sm4_lookup_tables lookup;
|
||||
@@ -6564,7 +6565,12 @@ static void write_sm4_stat(struct hlsl_ctx *ctx, const struct sm4_stat *stat, st
|
||||
add_section(ctx, dxbc, TAG_STAT, &buffer);
|
||||
}
|
||||
|
||||
int hlsl_sm4_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 they can be removed from the
|
||||
* arguments and this function can be independent of HLSL structs. */
|
||||
int tpf_compile(struct vsir_program *program, uint64_t config_flags,
|
||||
struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context,
|
||||
struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func)
|
||||
{
|
||||
struct sm4_stat stat = {0};
|
||||
struct dxbc_writer dxbc;
|
||||
|
Reference in New Issue
Block a user