3Dmigoto icon indicating copy to clipboard operation
3Dmigoto copied to clipboard

request support for min16f4 instruction

Open xuetaolu opened this issue 1 year ago • 2 comments

Files:

HLSLDecompiler_Test_min16f4.zip

Reproduction step

  1. decompression the zip file
  2. run Test.bat

Issue description

Unknown data type: min16f4

    Decompiling .\min16f4.dxbc...  
    creating HLSL representation 
    error parsing shader> Unknown data type: min16f4 
    error parsing shader> applySwizzle 2nd parameter missing '.': {min16f} 
    error while decompiling

the Corresponding instruction mov o0.xyzw {min16f}, r0.xyzw {def32 as min16f}

xuetaolu avatar Aug 14 '23 08:08 xuetaolu

We recommend using assembly rather than HLSL for those - the HLSL decompiler will never be able to accurately decompile every shader due to some fundamental issues with the difference between DXBC and HLSL, so more effort has gone into making the disassembler + assembler support everything possible rather than making the decompiler support a few more esoteric types.

Alternatively remove the partial precision types - most implementations transparently replace them with 32bit types anyway so there is rarely any point to using them.

DarkStarSword avatar Aug 15 '23 00:08 DarkStarSword

Oops, didn't mean to close the issue since it is a legit limitation of the decompiler, and perhaps some day it will be implemented, but don't hold your breath.

DarkStarSword avatar Aug 15 '23 00:08 DarkStarSword