summaryrefslogtreecommitdiffstats
path: root/include/no_extern_c.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-11-05 10:23:48 -0500
committerRob Clark <[email protected]>2015-11-19 20:03:32 -0500
commitacca6c65d3c793885b343aad17cbdbad7fbe1830 (patch)
tree4b35da101381c06989822b71e062f2ffe2fe5a44 /include/no_extern_c.h
parentc73f40c4731235153e29222eee8e12241166094a (diff)
nir: add nir_ssa_for_alu_src()
Using something like: numer = nir_ssa_for_src(bld, alu->src[0].src, nir_ssa_alu_instr_src_components(alu, 0)); for alu src's with swizzle, like: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_2 = udiv ssa_10.xx, ssa_11 ends up turning into something like: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_13 = imov ssa_10 ... because nir_ssa_for_src() ignore's the original nir_alu_src's swizzle. Instead for alu instructions, nir_src_for_alu_src() should be used to ensure the original alu src's swizzle doesn't get lost in translation: vec1 ssa_10 = intrinsic load_uniform () () (0, 0) vec2 ssa_11 = intrinsic load_uniform () () (1, 0) vec2 ssa_13 = imov ssa_10.xx ... v2: check for abs/neg, and re-use existing nir_alu_src Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'include/no_extern_c.h')
0 files changed, 0 insertions, 0 deletions