Lines Matching refs:pixelPtr
603 const deUint8* pixelPtr = (const deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
605 #define UB16(OFFS, COUNT) ((*((const deUint16*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
606 #define UB32(OFFS, COUNT) ((*((const deUint32*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
620 case TextureFormat::UNSIGNED_INT_999_E5_REV: return unpackRGB999E5(*((const deUint32*)pixelPtr));
635 float d = *((const float*)pixelPtr);
637 // deUint8 s = *((const deUint32*)(pixelPtr+4)) & 0xff;
666 result[c] = channelToFloat(pixelPtr + channelSize*((int)map), m_format.type);
679 const deUint8* pixelPtr = (const deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
685 if (m_format.order == TextureFormat::RGBA) return readRGBA8888Int(pixelPtr);
686 else if (m_format.order == TextureFormat::RGB) return readRGB888Int(pixelPtr);
689 #define U16(OFFS, COUNT) ((*((const deUint16*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
690 #define U32(OFFS, COUNT) ((*((const deUint32*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
715 float d = *((const float*)pixelPtr);
716 deUint8 s = *((const deUint32*)(pixelPtr+4)) & 0xffu;
740 result[c] = channelToInt(pixelPtr + channelSize*((int)map), m_format.type);
771 deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
773 #define UB32(OFFS, COUNT) ((*((const deUint32*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
793 return *((const float*)pixelPtr);
797 return channelToFloat(pixelPtr, m_format.type);
811 deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
818 case TextureFormat::S: return (int)(*((const deUint32*)pixelPtr) >> 8);
819 case TextureFormat::DS: return (int)(*((const deUint32*)pixelPtr) & 0xff);
828 return *((const deUint32*)(pixelPtr+4)) & 0xff;
833 return channelToInt(pixelPtr, m_format.type);
838 return channelToInt(pixelPtr + getChannelSize(m_format.type)*stencilChannelIndex, m_format.type);
868 deUint8* const pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
875 case TextureFormat::UNORM_SHORT_565: *((deUint16*)pixelPtr) = (deUint16)(PN(color[0], 11, 5) | PN(color[1], 5, 6) | PN(color[2], 0, 5)); break;
876 case TextureFormat::UNORM_SHORT_555: *((deUint16*)pixelPtr) = (deUint16)(PN(color[0], 10, 5) | PN(color[1], 5, 5) | PN(color[2], 0, 5)); break;
877 case TextureFormat::UNORM_SHORT_4444: *((deUint16*)pixelPtr) = (deUint16)(PN(color[0], 12, 4) | PN(color[1], 8, 4) | PN(color[2], 4, 4) | PN(color[3], 0, 4)); break;
878 case TextureFormat::UNORM_SHORT_5551: *((deUint16*)pixelPtr) = (deUint16)(PN(color[0], 11, 5) | PN(color[1], 6, 5) | PN(color[2], 1, 5) | PN(color[3], 0, 1)); break;
879 case TextureFormat::UNORM_INT_101010: *((deUint32*)pixelPtr) = PN(color[0], 22, 10) | PN(color[1], 12, 10) | PN(color[2], 2, 10); break;
880 case TextureFormat::UNORM_INT_1010102_REV: *((deUint32*)pixelPtr) = PN(color[0], 0, 10) | PN(color[1], 10, 10) | PN(color[2], 20, 10) | PN(color[3], 30, 2); break;
885 *((deUint32*)pixelPtr) = PU(u[0], 0, 10) | PU(u[1], 10, 10) |PU(u[2], 20, 10) | PU(u[3], 30, 2);
890 *((deUint32*)pixelPtr) = Float11(color[0]).bits() | (Float11(color[1]).bits() << 11) | (Float10(color[2]).bits() << 22);
894 *((deUint32*)pixelPtr) = packRGB999E5(color);
900 case TextureFormat::D: *((deUint32*)pixelPtr) = PN(color[0], 8, 24); break;
901 case TextureFormat::S: *((deUint32*)pixelPtr) = PN(color[3], 8, 24); break;
902 case TextureFormat::DS: *((deUint32*)pixelPtr) = PN(color[0], 8, 24) | PU((deUint32)color[3], 0, 8); break;
910 *((float*)pixelPtr) = color[0];
911 *((deUint32*)(pixelPtr+4)) = PU((deUint32)color[3], 0, 8);
917 *((float*)pixelPtr) = color[0];
930 floatToChannel(pixelPtr + channelSize*c, color[map[c]], m_format.type);
947 deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
952 pixelPtr, color); return; }
953 else if (m_format.order == TextureFormat::RGB) { writeRGB888Int(pixelPtr, color); return; }
960 case TextureFormat::UNORM_SHORT_565: *((deUint16*)pixelPtr) = (deUint16)(PU(color[0], 11, 5) | PU(color[1], 5, 6) | PU(color[2], 0, 5)); break;
961 case TextureFormat::UNORM_SHORT_555: *((deUint16*)pixelPtr) = (deUint16)(PU(color[0], 10, 5) | PU(color[1], 5, 5) | PU(color[2], 0, 5)); break;
962 case TextureFormat::UNORM_SHORT_4444: *((deUint16*)pixelPtr) = (deUint16)(PU(color[0], 12, 4) | PU(color[1], 8, 4) | PU(color[2], 4, 4) | PU(color[3], 0, 4)); break;
963 case TextureFormat::UNORM_SHORT_5551: *((deUint16*)pixelPtr) = (deUint16)(PU(color[0], 11, 5) | PU(color[1], 6, 5) | PU(color[2], 1, 5) | PU(color[3], 0, 1)); break;
964 case TextureFormat::UNORM_INT_101010: *((deUint32*)pixelPtr) = PU(color[0], 22, 10) | PU(color[1], 12, 10) | PU(color[2], 2, 10); break;
965 case TextureFormat::UNORM_INT_1010102_REV: *((deUint32*)pixelPtr) = PU(color[0], 0, 10) | PU(color[1], 10, 10) | PU(color[2], 20, 10) | PU(color[3], 30, 2); break;
966 case TextureFormat::UNSIGNED_INT_1010102_REV: *((deUint32*)pixelPtr) = PU(color[0], 0, 10) | PU(color[1], 10, 10) | PU(color[2], 20, 10) | PU(color[3], 30, 2); break;
971 case TextureFormat::D: *((deUint32*)pixelPtr) = PU(color[0], 8, 24); break;
972 case TextureFormat::S: *((deUint32*)pixelPtr) = PU(color[3], 8, 24); break;
973 case TextureFormat::DS: *((deUint32*)pixelPtr) = PU(color[0], 8, 24) | PU((deUint32)color[3], 0, 8); break;
981 *((deUint32*)pixelPtr) = color[0];
982 *((deUint32*)(pixelPtr+4)) = PU((deUint32)color[3], 0, 8);
993 intToChannel(pixelPtr + channelSize*c, color[map[c]], m_format.type);
1009 deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
1018 case TextureFormat::D: *((deUint32*)pixelPtr) = PN(depth, 8, 24); break;
1019 case TextureFormat::DS: *((deUint32*)pixelPtr) = (*((deUint32*)pixelPtr) & 0x000000ff) | PN(depth, 8, 24); break;
1027 *((float*)pixelPtr) = depth;
1032 floatToChannel(pixelPtr, depth, m_format.type);
1046 deUint8* pixelPtr = (deUint8*)getDataPtr() + z*m_slicePitch + y*m_rowPitch + x*pixelSize;
1055 case TextureFormat::S: *((deUint32*)pixelPtr) = PU(stencil, 8, 24); break;
1056 case TextureFormat::DS: *((deUint32*)pixelPtr) = (*((deUint32*)pixelPtr) & 0xffffff00) | PU(stencil, 0, 8); break;
1064 *((deUint32*)(pixelPtr+4)) = PU((deUint32)stencil, 0, 8);
1069 intToChannel(pixelPtr, stencil, m_format.type);
1074 intToChannel(pixelPtr + getChannelSize(m_format.type)*stencilChannelIndex, stencil, m_format.type);