mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Always load from a synthetic copy in add_load_component().
This commit is contained in:
parent
82ff408451
commit
dc2a34824d
Notes:
Alexandre Julliard
2023-04-13 23:20:40 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/124
@ -624,16 +624,9 @@ static struct hlsl_ir_load *add_load_component(struct hlsl_ctx *ctx, struct list
|
||||
unsigned int comp, const struct vkd3d_shader_location *loc)
|
||||
{
|
||||
const struct hlsl_deref *src;
|
||||
struct hlsl_ir_store *store;
|
||||
struct hlsl_ir_load *load;
|
||||
struct hlsl_block block;
|
||||
|
||||
if (var_instr->type == HLSL_IR_LOAD)
|
||||
{
|
||||
src = &hlsl_ir_load(var_instr)->src;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct hlsl_ir_store *store;
|
||||
struct hlsl_ir_var *var;
|
||||
|
||||
if (!(var = hlsl_new_synthetic_var(ctx, "deref", var_instr->data_type, &var_instr->loc)))
|
||||
@ -644,7 +637,6 @@ static struct hlsl_ir_load *add_load_component(struct hlsl_ctx *ctx, struct list
|
||||
list_add_tail(instrs, &store->node.entry);
|
||||
|
||||
src = &store->lhs;
|
||||
}
|
||||
|
||||
if (!(load = hlsl_new_load_component(ctx, &block, src, comp, loc)))
|
||||
return NULL;
|
||||
|
@ -276,7 +276,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo probe all rgba (2.0, 3.0, 6.0, 7.0)
|
||||
probe all rgba (2.0, 3.0, 6.0, 7.0)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
@ -294,4 +294,4 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo probe all rgba (2.0, 3.0, 6.0, 7.0)
|
||||
probe all rgba (2.0, 3.0, 6.0, 7.0)
|
||||
|
@ -12,7 +12,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo probe all rgba (0.3, 0.3, 0.4, 0.6)
|
||||
probe all rgba (0.3, 0.3, 0.4, 0.6)
|
||||
|
||||
[pixel shader]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user