Skip to content
Snippets Groups Projects

vkd3d-shader/hlsl: Add support for sign() intrinsic.

Merged Ethan Lee requested to merge flibitijibibo/vkd3d:sign into master

This replicates what seems to be happening when using sign() with shader model 3, which is roughly...

int pos = (int) (x > 0);
int neg = -((int) (x < 0));
int result = pos + neg;

Fixes https://bugs.winehq.org/show_bug.cgi?id=54826

Edited by Ethan Lee

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ethan Lee added 2 commits

    added 2 commits

    • 32255f96 - vkd3d-shader/hlsl: Add support for sign() intrinsic.
    • 00569e5b - tests: Add tests for sign() intrinsic.

    Compare with previous version

  • Ethan Lee resolved all threads

    resolved all threads

  • Ethan Lee added 6 commits

    added 6 commits

    Compare with previous version

  • Ethan Lee added 9 commits

    added 9 commits

    Compare with previous version

  • Elizabeth Figura approved this merge request

    approved this merge request

  • Giovanni Mascellani
  • Ethan Lee added 2 commits

    added 2 commits

    • 0a7302c2 - vkd3d-shader/hlsl: Add support for sign() intrinsic.
    • 30384ea4 - tests: Add tests for sign() intrinsic.

    Compare with previous version

  • Ethan Lee resolved all threads

    resolved all threads

  • Ethan Lee added 13 commits

    added 13 commits

    Compare with previous version

  • Another thought, though no need to change this MR: when you can, first adding the tests (with appropriate todo hints) and then the implementation (removing the todo hints) helps the reader understanding what your commit is actually fixing. It's pretty trivial in this case, but a good habit nevertheless I think.

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • Ethan Lee added 8 commits

    added 8 commits

    Compare with previous version

  • Ethan Lee added 2 commits

    added 2 commits

    • a5d840c1 - tests: Add tests for sign() intrinsic.
    • 51e69b29 - vkd3d-shader/hlsl: Add support for sign() intrinsic.

    Compare with previous version

  • Ethan Lee resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading