Skip to content
Snippets Groups Projects

vkd3d-shader/dxil: Implement miscellaneous arithmetic DX intrinsics.

Merged Conor McCarthy requested to merge cmccarthy/vkd3d:misc_arithmetic 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
4080 4084 ins->handler_idx = VKD3DSIH_NOP;
4081 4085 }
4082 4086
4087 static enum vkd3d_shader_opcode sm6_dx_map_ma_op(enum dx_intrinsic_opcode op, const struct sm6_type *type)
4088 {
4089 switch (op)
4090 {
4091 case DX_FMA:
4092 case DX_FMAD:
4093 return (type->u.width == 64) ? VKD3DSIH_DFMA : VKD3DSIH_MAD;
  • 4080 4084 ins->handler_idx = VKD3DSIH_NOP;
    4081 4085 }
    4082 4086
    4087 static enum vkd3d_shader_opcode sm6_dx_map_ma_op(enum dx_intrinsic_opcode op, const struct sm6_type *type)
    4088 {
    4089 switch (op)
    4090 {
    4091 case DX_FMA:
    4092 case DX_FMAD:
    4093 return (type->u.width == 64) ? VKD3DSIH_DFMA : VKD3DSIH_MAD;
    4094 case DX_IMAD:
    4095 case DX_UMAD:
    4096 return VKD3DSIH_IMAD;
    • Comment on lines +4094 to +4096

      Mmh, given your earlier patch I guess those are meant to be the signed and unsigned version and then the backend is expected to extract the right sign from the operand type. However, it seems that DXIL always emits unsigned integers, doesn't it? So the typing information here is lost anyway.

      To be honest I don't even understand why here signed vs unsigned is important, given that we're truncating to the lower bits anyway. Do you have an idea of what is meant to happen here?

    • I have no idea why there are signed and unsigned instructions, since it has no effect on the multiply or the add.

    • Please register or sign in to reply
  • Conor McCarthy added 3 commits

    added 3 commits

    • ac0d9e5d - vkd3d-shader/dxil: Implement DX intrinsics FMa, FMad, IMad and UMad.
    • aafdbb62 - vkd3d-shader/dxil: Implement DX intrinsic FAbs.
    • ae61d90b - vkd3d-shader/dxil: Implement DX intrinsic Saturate.

    Compare with previous version

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • Conor McCarthy added 5 commits

    added 5 commits

    • 451ffd2c - tests/hlsl: Add tests for mad() and fma().
    • c317ab6e - vkd3d-shader/spirv: Use dst register data type in spirv_compiler_emit_imad().
    • 35f64f43 - vkd3d-shader/dxil: Implement DX intrinsics FMa, FMad, IMad and UMad.
    • ebcd49a2 - vkd3d-shader/dxil: Implement DX intrinsic FAbs.
    • 65c8989e - vkd3d-shader/dxil: Implement DX intrinsic Saturate.

    Compare with previous version

  • Conor McCarthy added 5 commits

    added 5 commits

    • 7e75a58a - tests/hlsl: Add tests for mad() and fma().
    • 23bf90f8 - vkd3d-shader/spirv: Use dst register data type in spirv_compiler_emit_imad().
    • a3ce9897 - vkd3d-shader/dxil: Implement DX intrinsics FMa, FMad, IMad and UMad.
    • 3dae8f42 - vkd3d-shader/dxil: Implement DX intrinsic FAbs.
    • 821a5aa2 - vkd3d-shader/dxil: Implement DX intrinsic Saturate.

    Compare with previous version

  • Conor McCarthy mentioned in merge request !723 (closed)

    mentioned in merge request !723 (closed)

  • Henri Verbeet approved this merge request

    approved this merge request

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading