Skip to content

tests: Fix SM1 constant register allocation for numerics.

The included tests show that SM1 register allocation for numeric uniforms have two main rules that are different from what we are doing now.

  • The number of numeric registers allocated for a variable is given by the usage: it must be enough for all the derefences in the shader but no more than that. This unless the variable has a register(cX) register reservation, in which case the whole register size of the variable's type is used, even if the variable is unused. So far we are calling this bind_count.
  • Uniforms are allocated in decreasing bind_count order.

This MR solves https://bugs.winehq.org/show_bug.cgi?id=55207 and the test in !839 (comment 69302).

Merge request reports

Loading