forked from baldurk/renderdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Unimplemented HLSL ASM Instructions
baldurk edited this page Sep 2, 2014
·
10 revisions
Some of these may be easy to implement, I just haven't had a good example to base the implementation on & test against.
- Groupshared memory
- Texture UAVs
- OPCODE_INTERFACE_CALL
- OPCODE_CALL
- OPCODE_CALLC
- OPCODE_RET (this assumes that we don't have a 'callstack' of function calls to return from, and ends the shader currently)
These can all modify groupshared memory as well, as they can be easily implemented once that is implemented. However it's also tricky as these opcodes are only relevant when multiple threads can be running in parallel which we don't simulate. They should still work, but they won't work as expected (especially when sync isn't implemented)
- OPCODE_SYNC - how to implement this? no threads to sync to.
- OPCODE_ATOMIC_AND
- OPCODE_ATOMIC_OR
- OPCODE_ATOMIC_XOR
- OPCODE_ATOMIC_CMP_STORE
- OPCODE_ATOMIC_IMAX
- OPCODE_ATOMIC_IMIN
- OPCODE_IMM_ATOMIC_AND
- OPCODE_IMM_ATOMIC_OR
- OPCODE_IMM_ATOMIC_XOR
- OPCODE_IMM_ATOMIC_EXCH
- OPCODE_IMM_ATOMIC_CMP_EXCH
- OPCODE_IMM_ATOMIC_IADD
- OPCODE_IMM_ATOMIC_IMAX
- OPCODE_IMM_ATOMIC_IMIN
- OPCODE_IMM_ATOMIC_UMAX
- OPCODE_IMM_ATOMIC_UMIN
- OPCODE_CUT
- OPCODE_EMIT
- OPCODE_EMITTHENCUT
- OPCODE_EMIT_STREAM
- OPCODE_CUT_STREAM
- OPCODE_EMITTHENCUT_STREAM
- OPCODE_HS_DECLS
- OPCODE_HS_CONTROL_POINT_PHASE
- OPCODE_HS_FORK_PHASE
- OPCODE_HS_JOIN_PHASE
These are not documented anywhere on the bytecode side, only hlsl side 😩. Most of them are obvious though.
- OPCODE_ABORT
- OPCODE_DEBUGBREAK - ???
- OPCODE_DDIV - double divide
- OPCODE_DFMA - double fused multiply add
- OPCODE_DRCP - double reciprocal
- OPCODE_MSAD
- OPCODE_DTOI - double to int
- OPCODE_DTOU - double to uint
- OPCODE_ITOD - int to double
- OPCODE_UTOD - uint to double
Feedback functions (for tiled resources)
- OPCODE_GATHER4_FEEDBACK
- OPCODE_GATHER4_C_FEEDBACK
- OPCODE_GATHER4_PO_FEEDBACK
- OPCODE_GATHER4_PO_C_FEEDBACK
- OPCODE_LD_FEEDBACK
- OPCODE_LD_MS_FEEDBACK
- OPCODE_LD_UAV_TYPED_FEEDBACK
- OPCODE_LD_RAW_FEEDBACK
- OPCODE_LD_STRUCTURED_FEEDBACK
- OPCODE_SAMPLE_L_FEEDBACK
- OPCODE_SAMPLE_C_LZ_FEEDBACK
- OPCODE_SAMPLE_CLAMP_FEEDBACK
- OPCODE_SAMPLE_B_CLAMP_FEEDBACK
- OPCODE_SAMPLE_D_CLAMP_FEEDBACK
- OPCODE_SAMPLE_C_CLAMP_FEEDBACK
- OPCODE_CHECK_ACCESS_FULLY_MAPPED