mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Track object components usage and allocate registers accordingly.
This commit is contained in:
committed by
Alexandre Julliard
parent
7c2ac5b098
commit
4dba38e6c8
Notes:
Alexandre Julliard
2023-05-08 22:34:16 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/159
@@ -406,6 +406,11 @@ struct hlsl_ir_var
|
||||
* and the buffer_offset instead. */
|
||||
struct hlsl_reg regs[HLSL_REGSET_LAST + 1];
|
||||
|
||||
struct
|
||||
{
|
||||
bool used;
|
||||
} *objects_usage[HLSL_REGSET_LAST_OBJECT + 1];
|
||||
|
||||
uint32_t is_input_semantic : 1;
|
||||
uint32_t is_output_semantic : 1;
|
||||
uint32_t is_uniform : 1;
|
||||
@@ -1178,6 +1183,8 @@ unsigned int hlsl_swizzle_from_writemask(unsigned int writemask);
|
||||
struct hlsl_type *hlsl_deref_get_type(struct hlsl_ctx *ctx, const struct hlsl_deref *deref);
|
||||
bool hlsl_component_index_range_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
|
||||
unsigned int *start, unsigned int *count);
|
||||
bool hlsl_regset_index_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
|
||||
enum hlsl_regset regset, unsigned int *index);
|
||||
bool hlsl_offset_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, unsigned int *offset);
|
||||
unsigned int hlsl_offset_from_deref_safe(struct hlsl_ctx *ctx, const struct hlsl_deref *deref);
|
||||
struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref);
|
||||
|
Reference in New Issue
Block a user