mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Parse UAV stores.
This commit is contained in:
committed by
Alexandre Julliard
parent
0a2aaa690e
commit
03f9d16047
Notes:
Alexandre Julliard
2022-10-31 22:39:35 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/36
@@ -178,6 +178,7 @@ enum hlsl_ir_node_type
|
||||
HLSL_IR_LOOP,
|
||||
HLSL_IR_JUMP,
|
||||
HLSL_IR_RESOURCE_LOAD,
|
||||
HLSL_IR_RESOURCE_STORE,
|
||||
HLSL_IR_STORE,
|
||||
HLSL_IR_SWIZZLE,
|
||||
};
|
||||
@@ -410,6 +411,13 @@ struct hlsl_ir_resource_load
|
||||
struct hlsl_src coords, lod, texel_offset;
|
||||
};
|
||||
|
||||
struct hlsl_ir_resource_store
|
||||
{
|
||||
struct hlsl_ir_node node;
|
||||
struct hlsl_deref resource;
|
||||
struct hlsl_src coords, value;
|
||||
};
|
||||
|
||||
struct hlsl_ir_store
|
||||
{
|
||||
struct hlsl_ir_node node;
|
||||
@@ -578,6 +586,12 @@ static inline struct hlsl_ir_resource_load *hlsl_ir_resource_load(const struct h
|
||||
return CONTAINING_RECORD(node, struct hlsl_ir_resource_load, node);
|
||||
}
|
||||
|
||||
static inline struct hlsl_ir_resource_store *hlsl_ir_resource_store(const struct hlsl_ir_node *node)
|
||||
{
|
||||
assert(node->type == HLSL_IR_RESOURCE_STORE);
|
||||
return CONTAINING_RECORD(node, struct hlsl_ir_resource_store, node);
|
||||
}
|
||||
|
||||
static inline struct hlsl_ir_store *hlsl_ir_store(const struct hlsl_ir_node *node)
|
||||
{
|
||||
assert(node->type == HLSL_IR_STORE);
|
||||
@@ -781,6 +795,8 @@ struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl
|
||||
struct hlsl_ir_loop *hlsl_new_loop(struct hlsl_ctx *ctx, struct vkd3d_shader_location loc);
|
||||
struct hlsl_ir_resource_load *hlsl_new_resource_load(struct hlsl_ctx *ctx,
|
||||
const struct hlsl_resource_load_params *params, const struct vkd3d_shader_location *loc);
|
||||
struct hlsl_ir_resource_store *hlsl_new_resource_store(struct hlsl_ctx *ctx, const struct hlsl_deref *resource,
|
||||
struct hlsl_ir_node *coords, struct hlsl_ir_node *value, const struct vkd3d_shader_location *loc);
|
||||
struct hlsl_type *hlsl_new_struct_type(struct hlsl_ctx *ctx, const char *name,
|
||||
struct hlsl_struct_field *fields, size_t field_count);
|
||||
struct hlsl_ir_swizzle *hlsl_new_swizzle(struct hlsl_ctx *ctx, DWORD s, unsigned int components,
|
||||
@@ -829,6 +845,7 @@ unsigned int hlsl_combine_writemasks(unsigned int first, unsigned int second);
|
||||
unsigned int hlsl_map_swizzle(unsigned int swizzle, unsigned int writemask);
|
||||
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_offset_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, unsigned int *offset);
|
||||
|
||||
Reference in New Issue
Block a user