Skip to content

vkd3d-shader/hlsl: Fix infinite loops when applying copy-prop to swizzles, version 3.

Francisco Casas requested to merge fcasas/vkd3d:copyprop-fix-3 into master

Supersedes !482 (closed).

Instead of only storing the value that each variable's component has at the moment of the instruction currently handled by copy-prop, we store the trace of all the historic values with their timestamps, i.e. the instruction index on which the value was stored.

This allow us to query the value that the variable's component had at the time of a swizzle's load instead of the swizzle instead, which also preempts copy-prop from getting stuck in an infinite loop, as which the added tests.

Merge request reports

Loading