Skip to content
Snippets Groups Projects

vkd3d-shader/tpf: Write sysval semantic consistently; use the right dcl instruction for sv_isfrontface.

Merged Francisco Casas requested to merge fcasas/vkd3d:sysval_semantic into master

Specifically we should write the sysval semantic as an instruction idx for the following instructions:

VKD3D_SM4_OP_DCL_INPUT_SGV
VKD3D_SM4_OP_DCL_INPUT_PS_SGV
VKD3D_SM4_OP_DCL_INPUT_SIV
VKD3D_SM4_OP_DCL_INPUT_PS_SIV
VKD3D_SM4_OP_DCL_OUTPUT_SIV

and not the following ones:

VKD3D_SM4_OP_DCL_INPUT
VKD3D_SM4_OP_DCL_PS_INPUT
VKD3D_SM4_OP_DCL_OUTPUT

Which is consistent with what we do when reading these instructions in the following functions:

shader_sm4_read_declaration_register_semantic()
shader_sm4_read_dcl_input_ps_siv()

and

shader_sm4_read_dcl_input_ps()
shader_sm4_read_declaration_dst()

for the non-SGV and non-SIV cases.

Note that the non-SGV and non-SIV instructions don't need/use this extra information because they rely on the dst register type and index.

I suggest to introduce this change because the here replaced check is brittle, and we might be omitting the sysval semantic in some cases.


Additionally 2/2 introduces a fix for the declaration of sv_isfrontface, which native does with dcl_input_ps_sgv instead of dcl_input_ps_siv.

Merge request reports

Merge request pipeline #33289 skipped

Merge request pipeline skipped for 104435df

Approved by

Merged by Henri VerbeetHenri Verbeet 4 months ago (Oct 15, 2024 3:04pm UTC)

Merge details

  • Changes merged into master with 104435df.
  • Deleted the source branch.

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