Lines Matching refs:element
224 bool Blitter::read(Float4 &c, Pointer<Byte> element, const State &state)
231 c.w = Float(Int(*Pointer<Byte>(element)) & Int(0xF));
232 c.x = Float((Int(*Pointer<Byte>(element)) >> 4) & Int(0xF));
233 c.y = Float(Int(*Pointer<Byte>(element + 1)) & Int(0xF));
234 c.z = Float((Int(*Pointer<Byte>(element + 1)) >> 4) & Int(0xF));
238 c.x = Float(Int(*Pointer<SByte>(element)));
243 c.x = Float(Int(*Pointer<Byte>(element)));
247 c.x = Float(Int(*Pointer<Short>(element)));
251 c.x = Float(Int(*Pointer<UShort>(element)));
255 c.x = Float(*Pointer<Int>(element));
259 c.x = Float(*Pointer<UInt>(element));
264 c = Float4(*Pointer<Byte4>(element)).zyxw;
270 c = Float4(*Pointer<SByte4>(element));
278 c = Float4(*Pointer<Byte4>(element));
281 c = Float4(*Pointer<Short4>(element));
285 c = Float4(*Pointer<UShort4>(element));
288 c = Float4(*Pointer<Int4>(element));
291 c = Float4(*Pointer<UInt4>(element));
295 c.x = Float(Int(*Pointer<SByte>(element + 0)));
296 c.y = Float(Int(*Pointer<SByte>(element + 1)));
301 c.x = Float(Int(*Pointer<Byte>(element + 0)));
302 c.y = Float(Int(*Pointer<Byte>(element + 1)));
306 c.x = Float(Int(*Pointer<Short>(element + 0)));
307 c.y = Float(Int(*Pointer<Short>(element + 2)));
312 c.x = Float(Int(*Pointer<UShort>(element + 0)));
313 c.y = Float(Int(*Pointer<UShort>(element + 2)));
317 c.x = Float(*Pointer<Int>(element + 0));
318 c.y = Float(*Pointer<Int>(element + 4));
322 c.x = Float(*Pointer<UInt>(element + 0));
323 c.y = Float(*Pointer<UInt>(element + 4));
327 c = *Pointer<Float4>(element);
330 c.x = *Pointer<Float>(element + 0);
331 c.y = *Pointer<Float>(element + 4);
334 c.x = *Pointer<Float>(element);
337 c.w = Float(*Pointer<Half>(element + 6));
339 c.z = Float(*Pointer<Half>(element + 4));
341 c.y = Float(*Pointer<Half>(element + 2));
343 c.x = Float(*Pointer<Half>(element));
356 c.x = Float(As<Half>((*Pointer<UShort>(element + 0) & UShort(0x07FF)) << UShort(4)));
357 c.y = Float(As<Half>((*Pointer<UShort>(element + 1) & UShort(0x3FF8)) << UShort(1)));
358 c.z = Float(As<Half>((*Pointer<UShort>(element + 2) & UShort(0xFFC0)) >> UShort(1)));
362 c.x = Float(*Pointer<UInt>(element) & UInt(0x000001FF)); // R's mantissa (bits 0-8)
363 c.y = Float((*Pointer<UInt>(element) & UInt(0x0003FE00)) >> 9); // G's mantissa (bits 9-17)
364 c.z = Float((*Pointer<UInt>(element) & UInt(0x07FC0000)) >> 18); // B's mantissa (bits 18-26)
367 Float(UInt(1) << ((*Pointer<UInt>(element) & UInt(0xF8000000)) >> 27)) *
378 c.x = Float(Int((*Pointer<UShort>(element) & UShort(0xF800)) >> UShort(11)));
379 c.y = Float(Int((*Pointer<UShort>(element) & UShort(0x07E0)) >> UShort(5)));
380 c.z = Float(Int(*Pointer<UShort>(element) & UShort(0x001F)));
383 c.w = Float(Int((*Pointer<UShort>(element) & UShort(0x8000)) >> UShort(15)));
384 c.x = Float(Int((*Pointer<UShort>(element) & UShort(0x7C00)) >> UShort(10)));
385 c.y = Float(Int((*Pointer<UShort>(element) & UShort(0x03E0)) >> UShort(5)));
386 c.z = Float(Int(*Pointer<UShort>(element) & UShort(0x001F)));
390 c.x = Float(Int((*Pointer<UInt>(element) & UInt(0x000003FF))));
391 c.y = Float(Int((*Pointer<UInt>(element) & UInt(0x000FFC00)) >> 10));
392 c.z = Float(Int((*Pointer<UInt>(element) & UInt(0x3FF00000)) >> 20));
393 c.w = Float(Int((*Pointer<UInt>(element) & UInt(0xC0000000)) >> 30));
396 c.x = Float(Int((*Pointer<UShort>(element))));
400 c.x = Float(Int((*Pointer<UInt>(element) & UInt(0xFFFFFF00)) >> 8));
404 c.x = *Pointer<Float>(element);
407 c.x = Float(Int(*Pointer<Byte>(element)));
416 bool Blitter::write(Float4 &c, Pointer<Byte> element, const State &state)
431 *Pointer<Byte>(element) = (Byte(RoundInt(Float(c.y))) & Byte(0xF)) |
432 (*Pointer<Byte>(element) & Byte(0xF0));
436 *Pointer<Byte>(element) = (*Pointer<Byte>(element) & Byte(0xF)) |
441 *Pointer<Byte>(element) = (Byte(RoundInt(Float(c.y))) & Byte(0xF)) |
449 *Pointer<UShort>(element) = (writeR ? ((UShort(RoundInt(Float(c.x))) & UShort(0xF)) << UShort(12)) :
450 (*Pointer<UShort>(element) & UShort(0x000F))) |
452 (*Pointer<UShort>(element) & UShort(0x00F0))) |
454 (*Pointer<UShort>(element) & UShort(0x0F00))) |
456 (*Pointer<UShort>(element) & UShort(0xF000)));
462 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.w)) & Int(0xF)) |
474 *Pointer<UShort>(element) = (*Pointer<UShort>(element) & UShort(unmask)) |
486 *Pointer<Byte4>(element) = Byte4(PackUnsigned(c0, c0));
490 if(writeB) { *Pointer<Byte>(element + 0) = Byte(RoundInt(Float(c.z))); }
491 if(writeG) { *Pointer<Byte>(element + 1) = Byte(RoundInt(Float(c.y))); }
492 if(writeR) { *Pointer<Byte>(element + 2) = Byte(RoundInt(Float(c.x))); }
493 if(writeA) { *Pointer<Byte>(element + 3) = Byte(RoundInt(Float(c.w))); }
497 if(writeB) { *Pointer<SByte>(element + 0) = SByte(RoundInt(Float(c.z))); }
498 if(writeG) { *Pointer<SByte>(element + 1) = SByte(RoundInt(Float(c.y))); }
499 if(writeR) { *Pointer<SByte>(element + 2) = SByte(RoundInt(Float(c.x))); }
503 if(writeB) { *Pointer<Byte>(element + 0) = Byte(RoundInt(Float(c.z))); }
504 if(writeG) { *Pointer<Byte>(element + 1) = Byte(RoundInt(Float(c.y))); }
505 if(writeR) { *Pointer<Byte>(element + 2) = Byte(RoundInt(Float(c.x))); }
518 *Pointer<Byte4>(element) = Byte4(PackUnsigned(c0, c0));
522 if(writeR) { *Pointer<Byte>(element + 0) = Byte(RoundInt(Float(c.x))); }
523 if(writeG) { *Pointer<Byte>(element + 1) = Byte(RoundInt(Float(c.y))); }
524 if(writeB) { *Pointer<Byte>(element + 2) = Byte(RoundInt(Float(c.z))); }
525 if(writeA) { *Pointer<Byte>(element + 3) = Byte(RoundInt(Float(c.w))); }
531 *Pointer<Float4>(element) = c;
535 if(writeR) { *Pointer<Float>(element) = c.x; }
536 if(writeG) { *Pointer<Float>(element + 4) = c.y; }
537 if(writeB) { *Pointer<Float>(element + 8) = c.z; }
538 if(writeA) { *Pointer<Float>(element + 12) = c.w; }
542 if(writeR) { *Pointer<Float>(element) = c.x; }
543 if(writeG) { *Pointer<Float>(element + 4) = c.y; }
544 if(writeB) { *Pointer<Float>(element + 8) = c.z; }
549 *Pointer<Float2>(element) = Float2(c);
553 if(writeR) { *Pointer<Float>(element) = c.x; }
554 if(writeG) { *Pointer<Float>(element + 4) = c.y; }
558 if(writeR) { *Pointer<Float>(element) = c.x; }
561 if(writeA) { *Pointer<Half>(element + 6) = Half(c.w); }
563 if(writeB) { *Pointer<Half>(element + 4) = Half(c.z); }
565 if(writeG) { *Pointer<Half>(element + 2) = Half(c.y); }
567 if(writeR) { *Pointer<Half>(element) = Half(c.x); }
570 if(writeB) { *Pointer<SByte>(element) = SByte(RoundInt(Float(c.z))); }
571 if(writeG) { *Pointer<SByte>(element + 1) = SByte(RoundInt(Float(c.y))); }
572 if(writeR) { *Pointer<SByte>(element + 2) = SByte(RoundInt(Float(c.x))); }
573 if(writeA) { *Pointer<SByte>(element + 3) = SByte(RoundInt(Float(c.w))); }
581 if(writeA) { *Pointer<SByte>(element + 3) = SByte(RoundInt(Float(c.w))); }
586 if(writeB) { *Pointer<SByte>(element + 2) = SByte(RoundInt(Float(c.z))); }
591 if(writeG) { *Pointer<SByte>(element + 1) = SByte(RoundInt(Float(c.y))); }
596 if(writeR) { *Pointer<SByte>(element) = SByte(RoundInt(Float(c.x))); }
601 if(writeB) { *Pointer<Byte>(element + 2) = Byte(RoundInt(Float(c.z))); }
605 if(writeG) { *Pointer<Byte>(element + 1) = Byte(RoundInt(Float(c.y))); }
609 if(writeR) { *Pointer<Byte>(element) = Byte(RoundInt(Float(c.x))); }
616 *Pointer<Short4>(element) = Short4(RoundInt(c));
620 if(writeR) { *Pointer<Short>(element) = Short(RoundInt(Float(c.x))); }
621 if(writeG) { *Pointer<Short>(element + 2) = Short(RoundInt(Float(c.y))); }
622 if(writeB) { *Pointer<Short>(element + 4) = Short(RoundInt(Float(c.z))); }
623 if(writeA) { *Pointer<Short>(element + 6) = Short(RoundInt(Float(c.w))); }
629 if(writeR) { *Pointer<Short>(element) = Short(RoundInt(Float(c.x))); }
630 if(writeG) { *Pointer<Short>(element + 2) = Short(RoundInt(Float(c.y))); }
631 if(writeB) { *Pointer<Short>(element + 4) = Short(RoundInt(Float(c.z))); }
638 *Pointer<Short2>(element) = Short2(Short4(RoundInt(c)));
642 if(writeR) { *Pointer<Short>(element) = Short(RoundInt(Float(c.x))); }
643 if(writeG) { *Pointer<Short>(element + 2) = Short(RoundInt(Float(c.y))); }
649 if(writeR) { *Pointer<Short>(element) = Short(RoundInt(Float(c.x))); }
656 *Pointer<UShort4>(element) = UShort4(RoundInt(c));
660 if(writeR) { *Pointer<UShort>(element) = UShort(RoundInt(Float(c.x))); }
661 if(writeG) { *Pointer<UShort>(element + 2) = UShort(RoundInt(Float(c.y))); }
662 if(writeB) { *Pointer<UShort>(element + 4) = UShort(RoundInt(Float(c.z))); }
663 if(writeA) { *Pointer<UShort>(element + 6) = UShort(RoundInt(Float(c.w))); }
669 if(writeR) { *Pointer<UShort>(element) = UShort(RoundInt(Float(c.x))); }
670 if(writeG) { *Pointer<UShort>(element + 2) = UShort(RoundInt(Float(c.y))); }
671 if(writeB) { *Pointer<UShort>(element + 4) = UShort(RoundInt(Float(c.z))); }
678 *Pointer<UShort2>(element) = UShort2(UShort4(RoundInt(c)));
682 if(writeR) { *Pointer<UShort>(element) = UShort(RoundInt(Float(c.x))); }
683 if(writeG) { *Pointer<UShort>(element + 2) = UShort(RoundInt(Float(c.y))); }
689 if(writeR) { *Pointer<UShort>(element) = UShort(RoundInt(Float(c.x))); }
694 *Pointer<Int4>(element) = RoundInt(c);
698 if(writeR) { *Pointer<Int>(element) = RoundInt(Float(c.x)); }
699 if(writeG) { *Pointer<Int>(element + 4) = RoundInt(Float(c.y)); }
700 if(writeB) { *Pointer<Int>(element + 8) = RoundInt(Float(c.z)); }
701 if(writeA) { *Pointer<Int>(element + 12) = RoundInt(Float(c.w)); }
705 if(writeB) { *Pointer<Int>(element + 8) = RoundInt(Float(c.z)); }
707 if(writeG) { *Pointer<Int>(element + 4) = RoundInt(Float(c.y)); }
709 if(writeR) { *Pointer<Int>(element) = RoundInt(Float(c.x)); }
714 *Pointer<UInt4>(element) = UInt4(RoundInt(c));
718 if(writeR) { *Pointer<UInt>(element) = As<UInt>(RoundInt(Float(c.x))); }
719 if(writeG) { *Pointer<UInt>(element + 4) = As<UInt>(RoundInt(Float(c.y))); }
720 if(writeB) { *Pointer<UInt>(element + 8) = As<UInt>(RoundInt(Float(c.z))); }
721 if(writeA) { *Pointer<UInt>(element + 12) = As<UInt>(RoundInt(Float(c.w))); }
725 if(writeB) { *Pointer<UInt>(element + 8) = As<UInt>(RoundInt(Float(c.z))); }
727 if(writeG) { *Pointer<UInt>(element + 4) = As<UInt>(RoundInt(Float(c.y))); }
729 if(writeR) { *Pointer<UInt>(element) = As<UInt>(RoundInt(Float(c.x))); }
734 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.z)) |
742 *Pointer<UShort>(element) = (*Pointer<UShort>(element) & UShort(unmask)) |
751 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.w)) |
763 *Pointer<UShort>(element) = (*Pointer<UShort>(element) & UShort(unmask)) |
773 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.w)) |
785 *Pointer<UShort>(element) = (*Pointer<UShort>(element) & UShort(unmask)) |
795 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.z)) |
807 *Pointer<UShort>(element) = (*Pointer<UShort>(element) & UShort(unmask)) |
819 *Pointer<UInt>(element) = UInt(RoundInt(Float(c.x)) |
831 *Pointer<UInt>(element) = (*Pointer<UInt>(element) & UInt(unmask)) |
843 *Pointer<UInt>(element) = UInt(RoundInt(Float(c.z)) |
855 *Pointer<UInt>(element) = (*Pointer<UInt>(element) & UInt(unmask)) |
863 *Pointer<UShort>(element) = UShort(RoundInt(Float(c.x)));
867 *Pointer<UInt>(element) = UInt(RoundInt(Float(c.x)) << 8);
871 *Pointer<Float>(element) = c.x;
874 *Pointer<Byte>(element) = Byte(RoundInt(Float(c.x)));
882 bool Blitter::read(Int4 &c, Pointer<Byte> element, const State &state)
890 c = Insert(c, Int(*Pointer<SByte>(element + 3)), 3);
891 c = Insert(c, Int(*Pointer<SByte>(element + 2)), 2);
893 c = Insert(c, Int(*Pointer<SByte>(element + 1)), 1);
895 c = Insert(c, Int(*Pointer<SByte>(element)), 0);
898 c = Insert(c, Int((*Pointer<UInt>(element) & UInt(0x000003FF))), 0);
899 c = Insert(c, Int((*Pointer<UInt>(element) & UInt(0x000FFC00)) >> 10), 1);
900 c = Insert(c, Int((*Pointer<UInt>(element
901 c = Insert(c, Int((*Pointer<UInt>(element) & UInt(0xC0000000)) >> 30), 3);
905 c = Insert(c, Int(*Pointer<Byte>(element + 3)), 3);
906 c = Insert(c, Int(*Pointer<Byte>(element + 2)), 2);
908 c = Insert(c, Int(*Pointer<Byte>(element + 1)), 1);
910 c = Insert(c, Int(*Pointer<Byte>(element)), 0);
913 c = Insert(c, Int(*Pointer<Short>(element + 6)), 3);
914 c = Insert(c, Int(*Pointer<Short>(element + 4)), 2);
916 c = Insert(c, Int(*Pointer<Short>(element + 2)), 1);
918 c = Insert(c, Int(*Pointer<Short>(element)), 0);
921 c = Insert(c, Int(*Pointer<UShort>(element + 6)), 3);
922 c = Insert(c, Int(*Pointer<UShort>(element + 4)), 2);
924 c = Insert(c, Int(*Pointer<UShort>(element + 2)), 1);
926 c = Insert(c, Int(*Pointer<UShort>(element)), 0);
930 c = *Pointer<Int4>(element);
934 c = Insert(c, *Pointer<Int>(element + 4), 1);
937 c = Insert(c, *Pointer<Int>(element), 0);
946 bool Blitter::write(Int4 &c, Pointer<Byte> element, const State &state)
1008 if(writeA) { *Pointer<SByte>(element + 3) = SByte(Extract(c, 3)); }
1012 if(writeB) { *Pointer<SByte>(element) = SByte(Extract(c, 2)); }
1013 if(writeG) { *Pointer<SByte>(element + 1) = SByte(Extract(c, 1)); }
1014 if(writeR) { *Pointer<SByte>(element + 2) = SByte(Extract(c, 0)); }
1020 if(writeA) { *Pointer<SByte>(element + 3) = SByte(Extract(c, 3)); }
1023 if(writeB) { *Pointer<SByte>(element + 2) = SByte(Extract(c, 2)); }
1026 if(writeG) { *Pointer<SByte>(element + 1) = SByte(Extract(c, 1)); }
1029 if(writeR) { *Pointer<SByte>(element) = SByte(Extract(c, 0)); }
1037 *Pointer<UInt>(element) =
1047 *Pointer<UInt>(element) = (*Pointer<UInt>(element) & UInt(unmask)) |
1057 *Pointer<UInt>(element) =
1067 *Pointer<UInt>(element) = (*Pointer<UInt>(element) & UInt(unmask)) |
1073 if(writeA) { *Pointer<Byte>(element + 3) = Byte(Extract(c, 3)); }
1076 if(writeB) { *Pointer<Byte>(element) = Byte(Extract(c, 2)); }
1077 if(writeG) { *Pointer<Byte>(element + 1) = Byte(Extract(c, 1)); }
1078 if(writeR) { *Pointer<Byte>(element + 2) = Byte(Extract(c, 0)); }
1084 if(writeA) { *Pointer<Byte>(element + 3) = Byte(Extract(c, 3)); }
1087 if(writeB) { *Pointer<Byte>(element + 2) = Byte(Extract(c, 2)); }
1090 if(writeG) { *Pointer<Byte>(element + 1) = Byte(Extract(c, 1)); }
1093 if(writeR) { *Pointer<Byte>(element) = Byte(Extract(c, 0)); }
1097 if(writeA) { *Pointer<Short>(element + 6) = Short(Extract(c, 3)); }
1100 if(writeB) { *Pointer<Short>(element + 4) = Short(Extract(c, 2)); }
1103 if(writeG) { *Pointer<Short>(element + 2) = Short(Extract(c, 1)); }
1106 if(writeR) { *Pointer<Short>(element) = Short(Extract(c, 0)); }
1110 if(writeA) { *Pointer<UShort>(element + 6) = UShort(Extract(c, 3)); }
1113 if(writeB) { *Pointer<UShort>(element + 4) = UShort(Extract(c, 2)); }
1116 if(writeG) { *Pointer<UShort>(element + 2) = UShort(Extract(c, 1)); }
1119 if(writeR) { *Pointer<UShort>(element) = UShort(Extract(c, 0)); }
1124 *Pointer<Int4>(element) = c;
1128 if(writeR) { *Pointer<Int>(element) = Extract(c, 0); }
1129 if(writeG) { *Pointer<Int>(element + 4) = Extract(c, 1); }
1130 if(writeB) { *Pointer<Int>(element + 8) = Extract(c, 2); }
1131 if(writeA) { *Pointer<Int>(element + 12) = Extract(c, 3); }
1135 if(writeR) { *Pointer<Int>(element) = Extract(c, 0); }
1136 if(writeG) { *Pointer<Int>(element + 4) = Extract(c, 1); }
1137 if(writeB) { *Pointer<Int>(element + 8) = Extract(c, 2); }
1140 if(writeR) { *Pointer<Int>(element) = Extract(c, 0); }
1141 if(writeG) { *Pointer<Int>(element + 4) = Extract(c, 1); }
1144 if(writeR) { *Pointer<Int>(element) = Extract(c, 0); }
1149 *Pointer<UInt4>(element) = As<UInt4>(c);
1153 if(writeR) { *Pointer<UInt>(element) = As<UInt>(Extract(c, 0)); }
1154 if(writeG) { *Pointer<UInt>(element + 4) = As<UInt>(Extract(c, 1)); }
1155 if(writeB) { *Pointer<UInt>(element + 8) = As<UInt>(Extract(c, 2)); }
1156 if(writeA) { *Pointer<UInt>(element + 12) = As<UInt>(Extract(c, 3)); }
1160 if(writeB) { *Pointer<UInt>(element + 8) = As<UInt>(Extract(c, 2)); }
1162 if(writeG) { *Pointer<UInt>(element + 4) = As<UInt>(Extract(c, 1)); }
1164 if(writeR) { *Pointer<UInt>(element) = As<UInt>(Extract(c, 0)); }