mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Propagate copies for resource store instructions.
This commit is contained in:
committed by
Alexandre Julliard
parent
9bdae4dfaa
commit
c416627e64
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
@ -790,6 +790,15 @@ static bool copy_propagation_transform_resource_load(struct hlsl_ctx *ctx,
|
||||
return progress;
|
||||
}
|
||||
|
||||
static bool copy_propagation_transform_resource_store(struct hlsl_ctx *ctx,
|
||||
struct hlsl_ir_resource_store *store, struct copy_propagation_state *state)
|
||||
{
|
||||
bool progress = false;
|
||||
|
||||
progress |= copy_propagation_transform_object_load(ctx, &store->resource, state);
|
||||
return progress;
|
||||
}
|
||||
|
||||
static void copy_propagation_record_store(struct hlsl_ctx *ctx, struct hlsl_ir_store *store,
|
||||
struct copy_propagation_state *state)
|
||||
{
|
||||
@ -936,6 +945,10 @@ static bool copy_propagation_transform_block(struct hlsl_ctx *ctx, struct hlsl_b
|
||||
progress |= copy_propagation_transform_resource_load(ctx, hlsl_ir_resource_load(instr), state);
|
||||
break;
|
||||
|
||||
case HLSL_IR_RESOURCE_STORE:
|
||||
progress |= copy_propagation_transform_resource_store(ctx, hlsl_ir_resource_store(instr), state);
|
||||
break;
|
||||
|
||||
case HLSL_IR_STORE:
|
||||
copy_propagation_record_store(ctx, hlsl_ir_store(instr), state);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user