Shader Model 4 Assembly

Shader Model 4 requires you to program shaders in HLSL. However, the shader compiler compiles the HLSL code into assembly that runs on the device. If you are using PIX for Windows to debug your shaders, you can choose to display shader code in either HLSL or assembly. This section lists the Shader Model 4 and Shader Model 4.1 assembly instructions that you may encounter when debugging a shader.

Instruction Modifiers
add
and
break
breakc
call
callc
case
continue
continuec
cut
dcl_constantBuffer
dcl_globalFlags
dcl_immediateConstantBuffer
dcl_indexableTemp
dcl_indexRange
dcl_input
dcl_input_sv
dcl_input vPrim
dcl_maxOutputVertexCount
dcl_output
dcl_output oDepth
dcl_output_sgv
dcl_output_siv
dcl_outputTopology
dcl_resource
dcl_sampler
dcl_temps
default
deriv_rtx
deriv_rty
discard
div
dne
dp2
dp3
dp4
else
emit
emitThenCut
endif
endloop
endswitch
eq
exp
frc
ftoi
ftou
ge
iadd ieq
if
ige
ilt
imad
imin
imul
ine
ineg
ishl
ishr
itof
label
ld
log
loop
lt
mad
max
min
mov
movc
mul
ne
nop
not
or
resinfo
ret
retc
round_ne
round_ni
round_pi
round_z
rsq
sample
sample_b
sample_c
sample_c_lz
sample_d
sample_l
sincos
sqrt
switch
udiv
uge
ult
umad
umax
umin
umul
ushr
utof
xor

Shader Model 4.1 Assembly

Shader Model 4.1 supports all of the Shader Model 4.0 instructions and the following additional instructions:

gather4
ld2dms
lod
sampleinfo
samplepos

Asm Shader Reference

Shader Model 4