Skip to content

Draft: vkd3d-shader/hlsl: Fix assumptions in add_load_index() and add_load_component().

Francisco Casas requested to merge fcasas/vkd3d:fixes3 into master

Currently, we can't use add_load_index() or add_load_component() on the loads to the "retval" variables that come from add_call() because these functions assume that the loaded value (var_instr) won't change between its location and the location and the new load to be created.

We can't get rid of this assumptions either, because, at least add_load_index() may be used in the lhs of an assignment, and in that case we can't store to the "deref" synthetic:

x[0] = 20;

Here I implemented the alternative solution of copying "retval" into a synthetic variable after each function call, but we may want to discuss this approach.

Edited by Francisco Casas

Merge request reports

Loading