mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Allocate temporary registers separately for each entry function.
This commit is contained in:
Notes:
Henri Verbeet
2024-10-15 17:03:41 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1154
@@ -1089,9 +1089,6 @@ struct hlsl_ctx
|
||||
} constant_defs;
|
||||
/* 'c' registers where the constants expected by SM2 sincos are stored. */
|
||||
struct hlsl_reg d3dsincosconst1, d3dsincosconst2;
|
||||
/* Number of temp. registers required for the shader to run, i.e. the largest temp register
|
||||
* index that will be used in the output bytecode (+1). */
|
||||
uint32_t temp_count;
|
||||
|
||||
/* Number of threads to be executed (on the X, Y, and Z dimensions) in a single thread group in
|
||||
* compute shader profiles. It is set using the numthreads() attribute in the entry point. */
|
||||
@@ -1430,6 +1427,8 @@ struct hlsl_state_block_entry *clone_stateblock_entry(struct hlsl_ctx *ctx,
|
||||
|
||||
void hlsl_lower_index_loads(struct hlsl_ctx *ctx, struct hlsl_block *body);
|
||||
void hlsl_run_const_passes(struct hlsl_ctx *ctx, struct hlsl_block *body);
|
||||
uint32_t allocate_temp_registers(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func);
|
||||
void mark_indexable_vars(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func);
|
||||
int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func,
|
||||
enum vkd3d_shader_target_type target_type, struct vkd3d_shader_code *out);
|
||||
int hlsl_emit_effect_binary(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out);
|
||||
|
Reference in New Issue
Block a user