Skip to content

vkd3d-shader/hlsl: Fix an ICE with bitshift assignment operators.

Petrichor Park requested to merge petrathekat/vkd3d:unsigned-shift-mve into master

Previously, bitwise assignment operators with unsigned left-hand arguments would trigger an assertion failure. This was due to two errors:

  • Bitshift operators were parsed as requiring a signed right-hand side, when they need an unsigned right-hand side.
  • It was assumed that all operators coerced the left and right sides to the same type. This is true for all operators but bitshifts, which always have an unsigned right-side.

This commit has both the implementation and tests. Because it is an assertion error, the usual pattern of writing tests first and implementation second won't work because the tests abort even if marked todo.

Merge request reports

Loading