Home | History | Annotate | Download | only in Renderer

Lines Matching refs:Format

67 		switch(format)
390 switch(format)
1089 switch(format)
1168 Surface::Surface(int width, int height, int depth, Format format, void *pixels, int pitch, int slice) : lockable(true), renderTarget(false)
1179 external.format = format;
1180 external.bytes = bytes(external.format);
1192 internal.format = selectInternalFormat(format);
1193 internal.bytes = bytes(internal.format);
1194 internal.pitchB = pitchB(internal.width, internal.format, false);
1195 internal.pitchP = pitchP(internal.width, internal.format, false);
1196 internal.sliceB = sliceB(internal.width, internal.height, internal.format, false);
1197 internal.sliceP = sliceP(internal.width, internal.height, internal.format, false);
1205 stencil.format = FORMAT_S8;
1206 stencil.bytes = bytes(stencil.format);
1207 stencil.pitchB = pitchB(stencil.width, stencil.format, false);
1208 stencil.pitchP = pitchP(stencil.width, stencil.format, false);
1209 stencil.sliceB = sliceB(stencil.width, stencil.height, stencil.format, false);
1210 stencil.sliceP = sliceP(stencil.width, stencil.height, stencil.format, false);
1218 Surface::Surface(Resource *texture, int width, int height, int depth, Format format, bool lockable, bool renderTarget, int pitchPprovided) : lockable(lockable), renderTarget(renderTarget)
1229 external.format = format;
1230 external.bytes = bytes(external.format);
1231 external.pitchB = pitchB(external.width, external.format, renderTarget && !texture);
1232 external.pitchP = pitchP(external.width, external.format, renderTarget && !texture);
1233 external.sliceB = sliceB(external.width, external.height, external.format, renderTarget && !texture);
1234 external.sliceP = sliceP(external.width, external.height, external.format, renderTarget && !texture);
1242 internal.format = selectInternalFormat(format);
1243 internal.bytes = bytes(internal.format);
1244 internal.pitchB = !pitchPprovided ? pitchB(internal.width, internal.format, renderTarget) : pitchPprovided * internal.bytes;
1245 internal.pitchP = !pitchPprovided ? pitchP(internal.width, internal.format, renderTarget) : pitchPprovided;
1246 internal.sliceB = sliceB(internal.width, internal.height, internal.format, renderTarget);
1247 internal.sliceP = sliceP(internal.width, internal.height, internal.format, renderTarget);
1255 stencil.format = FORMAT_S8;
1256 stencil.bytes = bytes(stencil.format);
1257 stencil.pitchB = pitchB(stencil.width, stencil.format, renderTarget);
1258 stencil.pitchP = pitchP(stencil.width, stencil.format, renderTarget);
1259 stencil.sliceB = sliceB(stencil.width, stencil.height, stencil.format, renderTarget);
1260 stencil.sliceP = sliceP(stencil.width, stencil.height, stencil.format, renderTarget);
1308 external.buffer = allocateBuffer(external.width, external.height, external.depth, external.format);
1360 internal.buffer = allocateBuffer(internal.width, internal.height, internal.depth, internal.format);
1367 if(internal.dirty && renderTarget && internal.format != external.format)
1371 switch(external.format)
1389 if(external.dirty || (isPalette(external.format) && paletteUsed != Surface::paletteID))
1435 stencil.buffer = allocateBuffer(stencil.width, stencil.height, stencil.depth, stencil.format);
1448 int Surface::bytes(Format format)
1450 switch(format)
1611 int Surface::pitchB(int width, Format format, bool target)
1613 if(target || isDepth(format) || isStencil(format))
1618 switch(format)
1683 return bytes(format) * width;
1687 int Surface::pitchP(int width, Format format, bool target)
1689 int B = bytes(format);
1691 return B > 0 ? pitchB(width, format, target) / B : 0;
1694 int Surface::sliceB(int width, int height, Format format, bool target)
1696 if(target || isDepth(format) || isStencil(format))
1701 switch(format)
1723 return pitchB(width, format, target) * ((height + 3) / 4); // Pitch computed per 4 rows
1732 return pitchB(width, format, target) * ((height + 4) / 5); // Pitch computed per 5 rows
1739 return pitchB(width, format, target) * ((height + 5) / 6); // Pitch computed per 6 rows
1744 return pitchB(width, format, target) * ((height + 7) / 8); // Pitch computed per 8 rows
1749 return pitchB(width, format, target) * ((height + 9) / 10); // Pitch computed per 10 rows
1752 return pitchB(width, format, target) * ((height + 11) / 12); // Pitch computed per 12 rows
1756 return pitchB(width, format, target) * height; // Pitch computed per row
1760 int Surface::sliceP(int width, int height, Format format, bool target)
1762 int B = bytes(format);
1764 return B > 0 ? sliceB(width, height, format, target) / B : 0;
1776 switch(source.format)
1778 case FORMAT_R8G8B8: decodeR8G8B8(destination, source); break; // FIXME: Check destination format
1779 case FORMAT_X1R5G5B5: decodeX1R5G5B5(destination, source); break; // FIXME: Check destination format
1780 case FORMAT_A1R5G5B5: decodeA1R5G5B5(destination, source); break; // FIXME: Check destination format
1781 case FORMAT_X4R4G4B4: decodeX4R4G4B4(destination, source); break; // FIXME: Check destination format
1782 case FORMAT_A4R4G4B4: decodeA4R4G4B4(destination, source); break; // FIXME: Check destination format
1783 case FORMAT_P8: decodeP8(destination, source); break; // FIXME: Check destination format
1785 case FORMAT_DXT1: decodeDXT1(destination, source); break; // FIXME: Check destination format
1786 case FORMAT_DXT3: decodeDXT3(destination, source); break; // FIXME: Check destination format
1787 case FORMAT_DXT5: decodeDXT5(destination, source); break; // FIXME: Check destination format
1789 case FORMAT_ATI1: decodeATI1(destination, source); break; // FIXME: Check destination format
1790 case FORMAT_ATI2: decodeATI2(destination, source); break; // FIXME: Check destination format
1791 case FORMAT_R11_EAC: decodeEAC(destination, source, 1, false); break; // FIXME: Check destination format
1792 case FORMAT_SIGNED_R11_EAC: decodeEAC(destination, source, 1, true); break; // FIXME: Check destination format
1793 case FORMAT_RG11_EAC: decodeEAC(destination, source, 2, false); break; // FIXME: Check destination format
1794 case FORMAT_SIGNED_RG11_EAC: decodeEAC(destination, source, 2, true); break; // FIXME: Check destination format
1796 case FORMAT_RGB8_ETC2: decodeETC2(destination, source, 0, false); break; // FIXME: Check destination format
1797 case FORMAT_SRGB8_ETC2: decodeETC2(destination, source, 0, true); break; // FIXME: Check destination format
1798 case FORMAT_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: decodeETC2(destination, source, 1, false); break; // FIXME: Check destination format
1799 case FORMAT_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: decodeETC2(destination, source, 1, true); break; // FIXME: Check destination format
1800 case FORMAT_RGBA8_ETC2_EAC: decodeETC2(destination, source, 8, false); break; // FIXME: Check destination format
1801 case FORMAT_SRGB8_ALPHA8_ETC2_EAC: decodeETC2(destination, source, 8, true); break; // FIXME: Check destination format
1802 case FORMAT_RGBA_ASTC_4x4_KHR: decodeASTC(destination, source, 4, 4, 1, false); break; // FIXME: Check destination format
1803 case FORMAT_RGBA_ASTC_5x4_KHR: decodeASTC(destination, source, 5, 4, 1, false); break; // FIXME: Check destination format
1804 case FORMAT_RGBA_ASTC_5x5_KHR: decodeASTC(destination, source, 5, 5, 1, false); break; // FIXME: Check destination format
1805 case FORMAT_RGBA_ASTC_6x5_KHR: decodeASTC(destination, source, 6, 5, 1, false); break; // FIXME: Check destination format
1806 case FORMAT_RGBA_ASTC_6x6_KHR: decodeASTC(destination, source, 6, 6, 1, false); break; // FIXME: Check destination format
1807 case FORMAT_RGBA_ASTC_8x5_KHR: decodeASTC(destination, source, 8, 5, 1, false); break; // FIXME: Check destination format
1808 case FORMAT_RGBA_ASTC_8x6_KHR: decodeASTC(destination, source, 8, 6, 1, false); break; // FIXME: Check destination format
1809 case FORMAT_RGBA_ASTC_8x8_KHR: decodeASTC(destination, source, 8, 8, 1, false); break; // FIXME: Check destination format
1810 case FORMAT_RGBA_ASTC_10x5_KHR: decodeASTC(destination, source, 10, 5, 1, false); break; // FIXME: Check destination format
1811 case FORMAT_RGBA_ASTC_10x6_KHR: decodeASTC(destination, source, 10, 6, 1, false); break; // FIXME: Check destination format
1812 case FORMAT_RGBA_ASTC_10x8_KHR: decodeASTC(destination, source, 10, 8, 1, false); break; // FIXME: Check destination format
1813 case FORMAT_RGBA_ASTC_10x10_KHR: decodeASTC(destination, source, 10, 10, 1, false); break; // FIXME: Check destination format
1814 case FORMAT_RGBA_ASTC_12x10_KHR: decodeASTC(destination, source, 12, 10, 1, false); break; // FIXME: Check destination format
1815 case FORMAT_RGBA_ASTC_12x12_KHR: decodeASTC(destination, source, 12, 12, 1, false); break; // FIXME: Check destination format
1816 case FORMAT_SRGB8_ALPHA8_ASTC_4x4_KHR: decodeASTC(destination, source, 4, 4, 1, true); break; // FIXME: Check destination format
1817 case FORMAT_SRGB8_ALPHA8_ASTC_5x4_KHR: decodeASTC(destination, source, 5, 4, 1, true); break; // FIXME: Check destination format
1818 case FORMAT_SRGB8_ALPHA8_ASTC_5x5_KHR: decodeASTC(destination, source, 5, 5, 1, true); break; // FIXME: Check destination format
1819 case FORMAT_SRGB8_ALPHA8_ASTC_6x5_KHR: decodeASTC(destination, source, 6, 5, 1, true); break; // FIXME: Check destination format
1820 case FORMAT_SRGB8_ALPHA8_ASTC_6x6_KHR: decodeASTC(destination, source, 6, 6, 1, true); break; // FIXME: Check destination format
1821 case FORMAT_SRGB8_ALPHA8_ASTC_8x5_KHR: decodeASTC(destination, source, 8, 5, 1, true); break; // FIXME: Check destination format
1822 case FORMAT_SRGB8_ALPHA8_ASTC_8x6_KHR: decodeASTC(destination, source, 8, 6, 1, true); break; // FIXME: Check destination format
1823 case FORMAT_SRGB8_ALPHA8_ASTC_8x8_KHR: decodeASTC(destination, source, 8, 8, 1, true); break; // FIXME: Check destination format
1824 case FORMAT_SRGB8_ALPHA8_ASTC_10x5_KHR: decodeASTC(destination, source, 10, 5, 1, true); break; // FIXME: Check destination format
1825 case FORMAT_SRGB8_ALPHA8_ASTC_10x6_KHR: decodeASTC(destination, source, 10, 6, 1, true); break; // FIXME: Check destination format
1826 case FORMAT_SRGB8_ALPHA8_ASTC_10x8_KHR: decodeASTC(destination, source, 10, 8, 1, true); break; // FIXME: Check destination format
1827 case FORMAT_SRGB8_ALPHA8_ASTC_10x10_KHR: decodeASTC(destination, source, 10, 10, 1, true); break; // FIXME: Check destination format
1828 case FORMAT_SRGB8_ALPHA8_ASTC_12x10_KHR: decodeASTC(destination, source, 12, 10, 1, true); break; // FIXME: Check destination format
1829 case FORMAT_SRGB8_ALPHA8_ASTC_12x12_KHR: decodeASTC(destination, source, 12, 12, 1, true); break; // FIXME: Check destination format
1852 if(source.format == destination.format)
2495 unsigned int Surface::size(int width, int height, int depth, Format format)
2501 switch(format)
2578 return bytes(format) * width * height * depth;
2584 bool Surface::isStencil(Format format)
2586 switch(format)
2609 bool Surface::isDepth(Format format)
2611 switch(format)
2634 bool Surface::isPalette(Format format)
2636 switch(format)
2646 bool Surface::isFloatFormat(Format format)
2648 switch(format)
2727 bool Surface::isUnsignedComponent(Format format, int component)
2729 switch(format)
2808 bool Surface::isSRGBreadable(Format format)
2811 switch(format)
2841 bool Surface::isSRGBwritable(Format format)
2844 switch(format)
2860 bool Surface::isCompressed(Format format)
2862 switch(format)
2916 bool Surface::isNonNormalizedInteger(Format format)
2918 switch(format)
2950 int Surface::componentCount(Format format)
2952 switch(format)
3022 void *Surface::allocateBuffer(int width, int height, int depth, Format format)
3030 return allocateZero(size(width2, height2, depth, format) + 4);
3133 if(internal.format == FORMAT_D32F_LOCKABLE ||
3134 internal.format == FORMAT_D32FS8_TEXTURE ||
3135 internal.format == FORMAT_D32FS8_SHADOW)
3403 return isStencil(external.format);
3408 return isDepth(external.format);
3413 return isPalette(external.format);
3438 return external.format == internal.format &&
3446 Format Surface::selectInternalFormat(Format format) const
3448 switch(format)
3596 // ASTC supports HDR, so a floating point format is required to represent it properly
3602 return FORMAT_R32F; // FIXME: Signed 8bit format would be sufficient
3607 return FORMAT_G32R32F; // FIXME: Signed 8bit format would be sufficient
3683 if(internal.depth <= 1 || !internal.dirty || !renderTarget || internal.format == FORMAT_NULL)
3713 if(internal.format == FORMAT_X8R8G8B8 || internal.format == FORMAT_A8R8G8B8 ||
3714 internal.format == FORMAT_X8B8G8R8 || internal.format == FORMAT_A8B8G8R8 ||
3715 internal.format == FORMAT_SRGB8_X8 || internal.format == FORMAT_SRGB8_A8)
4006 else if(internal.format == FORMAT_G16R16)
4297 else if(internal.format == FORMAT_A16B16G16R16)
4588 else if(internal.format == FORMAT_R32F)
4883 else if(internal.format == FORMAT_G32R32F)
5178 else if(internal.format == FORMAT_A32B32G32R32F || internal.format == FORMAT_X32B32G32R32F)
5473 else if(internal.format == FORMAT_R5G6B5)