mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Propagate copies for resource store instructions.
This commit is contained in:
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;
|
||||
|
@ -49,7 +49,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
draw quad
|
||||
probe uav 1 (0, 0) r (0.5)
|
||||
probe uav 1 (0, 1) r (0.6)
|
||||
probe uav 1 (1, 0) r (0.2)
|
||||
@ -99,7 +99,7 @@ float4 main() : sv_target1
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
draw quad
|
||||
probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ float4 main() : sv_target1
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
draw quad
|
||||
probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
||||
% Test that we can declare and use an array of UAVs.
|
||||
|
Loading…
Reference in New Issue
Block a user