MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / v_make_vec4f_mask

Function v_make_vec4f_mask

include/vecmath/dag_vecMath_common.h:47–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47VECTORCALL VECMATH_FINLINE vec4f v_make_vec4f_mask(uint8_t bitmask)
48{
49 vec4i lookup = v_make_vec4i(1 << 0, 1 << 1, 1 << 2, 1 << 3);
50 vec4i isolated = v_andi(v_splatsi(bitmask), lookup);
51 return v_cast_vec4f(v_cmp_eqi(isolated, lookup));
52}
53
54VECTORCALL VECMATH_FINLINE bool v_check_xy_all_true(vec4f a) { return v_extract_xi64(v_cast_vec4i(a)) == int64_t(-1); }
55VECTORCALL VECMATH_FINLINE bool v_check_xy_all_false(vec4f a) { return v_extract_xi64(v_cast_vec4i(a)) == 0; }

Callers 1

v_bbox3_pointFunction · 0.85

Calls 5

v_make_vec4iFunction · 0.70
v_andiFunction · 0.70
v_splatsiFunction · 0.70
v_cast_vec4fFunction · 0.70
v_cmp_eqiFunction · 0.70

Tested by

no test coverage detected