Skip to content
Snippets Groups Projects

hlsl: More function-related tests.

Merged Elizabeth Figura requested to merge zfigura/vkd3d:pr4 into master
2 unresolved threads

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
49 uniform float f;
50
51 float4 main() : sv_target
52 {
53 if (f < 0.5)
54 return float4(0.1, 0.2, 0.3, 0.4);
55 return float4(0.5, 0.6, 0.7, 0.8);
56 }
57
58 [test]
59 uniform 0 float 0.2
60 draw quad
61 todo probe all rgba (0.1, 0.2, 0.3, 0.4)
62 uniform 0 float 0.8
63 draw quad
64 probe all rgba (0.5, 0.6, 0.7, 0.8)
  • Francisco Casas
    Francisco Casas @fcasas started a thread on an outdated change in commit 951570cd
  • 8
    9 [pixel shader]
    10
    11 float4 main() : sv_target
    12 {
    13 return 0.1;
    14 }
    15
    16 float4 main(float tex : texcoord) : sv_target
    17 {
    18 return tex;
    19 }
    20
    21 [test]
    22 draw quad
    23 todo probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)
    • Comment on lines +1 to +23

      Actually it seems that the chosen function depends on the version of the compiler!

      fxc 9.29.952.3111 (d3d_compiler43.dll) seems to load the first main(), while fxc 10.1 (d3d_compiler47.dll) seems to load the second, at least for me.

    • Indeed. Nice. Some further testing implies that 43 always picks the first function, and 47 always picks the last, i.e. the arguments don't matter.

      (Side note, that version number seems to come from the d3dcompiler dll, not fxc. At least, I get the same version number in native disassembly.)

      46 behaves like 47.

      I think this is the first difference in behaviour we've found that we're actually going to want to put effort into emulating. We'll have to figure out a way to deal with it in the tests...

    • Elizabeth Figura changed this line in version 3 of the diff

      changed this line in version 3 of the diff

    • To me it would make sense to just stipulate that we're targeting 47, and leave a comment about 43 behaving differently for when we'll care about that.

    • Please register or sign in to reply
  • I think that the patch series is fine except for my two comments.

  • Elizabeth Figura added 2 commits

    added 2 commits

    • 8b3dc45e - tests: Add more tests for early return from the entry point.
    • 69f2d21c - tests: Test entry point semantics on function declarations.

    Compare with previous version

  • Pushed v2 with the doubled test removed, and the overloading tests dropped for now (since they're not really relevant to user-defined functions anyway.)

  • Francisco Casas approved this merge request

    approved this merge request

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • The last patch in this series has a (trivial) conflict in Makefile.am.

  • Elizabeth Figura added 32 commits

    added 32 commits

    • 69f2d21c...653cc02f - 29 commits from branch wine:master
    • 501fc445 - tests: Add some tests for early return from user-defined functions.
    • 300b651b - tests: Add more tests for early return from the entry point.
    • bd55718f - tests: Test entry point semantics on function declarations.

    Compare with previous version

  • The last patch in this series has a (trivial) conflict in Makefile.am.

    Rebased, thanks.

  • Elizabeth Figura added 16 commits

    added 16 commits

    • bd55718f...f9e7cb63 - 13 commits from branch wine:master
    • c52a3c63 - tests: Add some tests for early return from user-defined functions.
    • e6d053b9 - tests: Add more tests for early return from the entry point.
    • b282db43 - tests: Test entry point semantics on function declarations.

    Compare with previous version

  • Elizabeth Figura added 4 commits

    added 4 commits

    • 16cef375 - vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions.
    • 6c311517 - tests: Add some tests for early return from user-defined functions.
    • 593b4f9e - tests: Add more tests for early return from the entry point.
    • 6a71479f - tests: Test entry point semantics on function declarations.

    Compare with previous version

  • Henri Verbeet approved this merge request

    approved this merge request

  • added 4 commits

    • aa3badbd - vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions.
    • 7460d7ad - tests: Add some tests for early return from user-defined functions.
    • 4954c363 - tests: Add more tests for early return from the entry point.
    • 68c232cf - tests: Test entry point semantics on function declarations.

    Compare with previous version

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Francisco Casas mentioned in merge request !85 (merged)

    mentioned in merge request !85 (merged)

  • Please register or sign in to reply
    Loading