Skip to content
Snippets Groups Projects

vkd3d-shader: Add constant folding for the 'dot' operation.

Merged Nikolay Sivov requested to merge nsivov/vkd3d:fold_dot into master
2 unresolved threads

Signed-off-by: Nikolay Sivov nsivov@codeweavers.com

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
  • Francisco Casas approved this merge request

    approved this merge request

  • Giovanni Mascellani
    Giovanni Mascellani @giomasce started a thread on an outdated change in commit 571948a8
  • 294 294 return true;
    295 295 }
    296 296
    297 static bool fold_dot(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type,
    298 const struct hlsl_ir_constant *src1, const struct hlsl_ir_constant *src2)
    299 {
    300 enum hlsl_base_type type = dst_type->base_type;
    301 unsigned int k;
    302
    303 assert(type == src1->node.data_type->base_type);
    304 assert(type == src2->node.data_type->base_type);
    305 assert(src1->node.data_type->dimx == src2->node.data_type->dimx);
    306 assert(type == HLSL_TYPE_FLOAT || type == HLSL_TYPE_HALF);
  • Nikolay Sivov added 3 commits

    added 3 commits

    • bce2a898 - 1 commit from branch wine:master
    • 5335003d - vkd3d-shader: Add constant folding for the 'dot' operation.
    • 7bbe05a9 - vkd3d-shader: Add constant folding for 'dp2add' operation.

    Compare with previous version

    • Thanks, that's ok for me. Notice that we're not dealing with a lot of complications that come with floating point numbers. For example, SM1-3 doesn't allow infinities or NaNs (AFAIU), so I'm not sure of what should happen if the dot folding results in one of those. However, most of the constant folding code doesn't care, so I'm ignoring the issue for the time being.

      Also, we usually keep switch cases separated with newlines.

    • Author Developer

      Do we know how consistent handling of special float values is? Maybe we should have some helpers for multiplication/addition that will handle this depending on profile.

    • Personally I don't know.

    • Please register or sign in to reply
  • Giovanni Mascellani approved this merge request

    approved this merge request

  • Nikolay Sivov added 143 commits

    added 143 commits

    • 7bbe05a9...f95ab2a5 - 141 commits from branch wine:master
    • 44163eda - vkd3d-shader: Add constant folding for the 'dot' operation.
    • 5e4a481f - vkd3d-shader: Add constant folding for 'dp2add' operation.

    Compare with previous version

  • Nikolay Sivov added 40 commits

    added 40 commits

    • 5e4a481f...5d75731d - 38 commits from branch wine:master
    • 6e21b657 - vkd3d-shader: Add constant folding for the 'dot' operation.
    • eade61d1 - vkd3d-shader: Add constant folding for 'dp2add' operation.

    Compare with previous version

  • Elizabeth Figura approved this merge request

    approved this merge request

  • Sorry about this, I lost track of this one for a while.

  • Henri Verbeet approved this merge request

    approved this merge request

  • Alexandre Julliard added 14 commits

    added 14 commits

    • eade61d1...983d01df - 12 commits from branch wine:master
    • 25ff5676 - vkd3d-shader: Add constant folding for the 'dot' operation.
    • 7e99188d - vkd3d-shader: Add constant folding for 'dp2add' operation.

    Compare with previous version

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading