Home | History | Annotate | Download | only in gallivm

Lines Matching full:dst_type

277                  struct lp_type dst_type,
287 assert(!dst_type.floating);
288 assert(dst_type.width == src_type.width * 2);
289 assert(dst_type.length * 2 == src_type.length);
291 if(dst_type.sign && src_type.sign) {
310 dst_vec_type = lp_build_vec_type(gallivm, dst_type);
326 struct lp_type dst_type,
334 assert(src_type.width * src_type.length == dst_type.width * dst_type.length);
337 assert(src_type.length == dst_type.length * num_dsts);
342 while(src_type.width < dst_type.width) {
380 struct lp_type dst_type,
385 LLVMTypeRef dst_vec_type = lp_build_vec_type(gallivm, dst_type);
388 struct lp_type intr_type = dst_type;
395 assert(!dst_type.floating);
396 assert(src_type.width == dst_type.width * 2);
397 assert(src_type.length * 2 == dst_type.length);
405 if(dst_type.sign) {
413 intr_type = dst_type;
419 if (dst_type.sign) {
440 struct lp_type ndst_type = lp_type_unorm(dst_type.width, 128);
483 shuffle = lp_build_const_pack_shuffle(gallivm, dst_type.length);
501 struct lp_type dst_type,
508 assert(!dst_type.floating);
509 assert(src_type.sign == dst_type.sign);
510 assert(src_type.width == dst_type.width * 2);
511 assert(src_type.length * 2 == dst_type.length);
525 unsigned dst_bits = dst_type.sign ? dst_type.width - 1 : dst_type.width;
533 return lp_build_pack2(gallivm, src_type, dst_type, lo, hi);
545 struct lp_type dst_type,
551 struct lp_type dst_type,
558 assert(src_type.width * src_type.length == dst_type.width * dst_type.length);
561 assert(src_type.length * num_srcs == dst_type.length);
571 while(src_type.width > dst_type.width) {
578 if(tmp_type.width == dst_type.width)
579 tmp_type.sign = dst_type.sign;
605 struct lp_type dst_type,
617 assert(src_type.floating == dst_type.floating);
623 assert((!src_type.floating && !dst_type.floating) ||
624 src_type.width == dst_type.width);
627 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
633 assert(dst_type.length <= LP_MAX_VECTOR_LENGTH);
637 if (src_type.width > dst_type.width) {
644 if (src_type.width * src_type.length == dst_type.width * dst_type.length) {
648 tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, src, num_srcs);
651 if (src_type.width / dst_type.width > num_srcs) {
658 (dst_type.length * dst_type.width);
668 tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, tmp, num_srcs);
676 unsigned size_ratio = (dst_type.width * dst_type.length) /
679 dst_type.length = dst_type.length / size_ratio;
682 tmp[i] = lp_build_pack(gallivm, src_type, dst_type, TRUE,
685 tmp[0] = lp_build_concat(gallivm, tmp, dst_type, size_ratio);
689 else if (src_type.width < dst_type.width) {
696 if (src_type.width * src_type.length == dst_type.width * dst_type.length) {
700 lp_build_unpack(gallivm, src_type, dst_type, src[0], tmp, num_dsts);
706 assert(src_type.length * num_srcs == dst_type.length * num_dsts);
709 tmp[i] = lp_build_undef(gallivm, dst_type);
713 unsigned j = i / dst_type.length;
715 LLVMValueRef dstindex = lp_build_const_int32(gallivm, i % dst_type.length);
718 if (src_type.sign && dst_type.sign) {
719 val = LLVMBuildSExt(builder, val, lp_build_elem_type(gallivm, dst_type), "");
721 val = LLVMBuildZExt(builder, val, lp_build_elem_type(gallivm, dst_type), "");