Skip to content
Snippets Groups Projects

vkd3d-shader/tpf: Combine struct sm4_dst_register and struct sm4_src_register.

Closed Francisco Casas requested to merge fcasas/vkd3d:merge_regs into master
1 unresolved thread

This series is basically a single patch but that requires @cmccarthy's !225 (merged) first. So, the 2 patches from !225 (merged) are included as 1/3 and 2/3.

As can be implied from !225 (merged), in SM4 bytecode, all the information regarding whether the register uses a writemask, a swizzle, a dimension index, or none of these, is encoded in the register itself, and doesn't depend on the instruction nor argument position on which the register is used.

The possible register encodings are given by the following diagram:

diagram3.drawio

Where the swizzle_type (MASK4, VEC4, or SCALAR) only matter when the dim is VEC4.

Thus, it makes sense to merge these two types of registers into a single data type as 3/3 does. This has the added benefit of removing additional writemask and swizzle_type arguments to be initialized by pointer in several helper functions.

Also, this would help me to simplify a new version of !229 (closed).

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
Please register or sign in to reply
Loading