parameterize number of dimensions of vector in tvec<D, T, P>
- specializes for 1, 2, 3 and 4-dimensional vector types which are then aliased as tvec1, tvec2, tvec3 and tvec4 - requires C++11 aliases; breaks compatability with C++03 - tested on: - clang-3.5.2, clang-3.8.0 - gcc 4.8.5, gcc 5.4.1, gcc 6.2.0 TODO: - still uses template template parameters - most can probably be removed - some definitions might now be de-duplicated
This commit is contained in:
@@ -151,17 +151,17 @@ namespace bitfieldReverse
|
||||
return Result;
|
||||
}
|
||||
*/
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> bitfieldReverseLoop(vecType<T, P> const & v)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> bitfieldReverseLoop(vecType<D, T, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldReverse' only accept integer values");
|
||||
|
||||
vecType<T, P> Result(0);
|
||||
vecType<D, T, P> Result(0);
|
||||
T const BitSize = static_cast<T>(sizeof(T) * 8);
|
||||
for(T i = 0; i < BitSize; ++i)
|
||||
{
|
||||
vecType<T, P> const BitSet(v & (static_cast<T>(1) << i));
|
||||
vecType<T, P> const BitFirst(BitSet >> i);
|
||||
vecType<D, T, P> const BitSet(v & (static_cast<T>(1) << i));
|
||||
vecType<D, T, P> const BitFirst(BitSet >> i);
|
||||
Result |= BitFirst << (BitSize - 1 - i);
|
||||
}
|
||||
return Result;
|
||||
@@ -170,7 +170,7 @@ namespace bitfieldReverse
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T bitfieldReverseLoop(T v)
|
||||
{
|
||||
return bitfieldReverseLoop(glm::tvec1<T>(v)).x;
|
||||
return bitfieldReverseLoop(glm::tvec<1, T>(v)).x;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER glm::uint32_t bitfieldReverseUint32(glm::uint32_t x)
|
||||
@@ -197,8 +197,8 @@ namespace bitfieldReverse
|
||||
template <bool EXEC = false>
|
||||
struct compute_bitfieldReverseStep
|
||||
{
|
||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<D, T, P> const & v, T, T)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
@@ -207,17 +207,17 @@ namespace bitfieldReverse
|
||||
template <>
|
||||
struct compute_bitfieldReverseStep<true>
|
||||
{
|
||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<D, T, P> const & v, T Mask, T Shift)
|
||||
{
|
||||
return (v & Mask) << Shift | (v & (~Mask)) >> Shift;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> bitfieldReverseOps(vecType<T, P> const & v)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> bitfieldReverseOps(vecType<D, T, P> const & v)
|
||||
{
|
||||
vecType<T, P> x(v);
|
||||
vecType<D, T, P> x(v);
|
||||
x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 2>::call(x, T(0x5555555555555555ull), static_cast<T>( 1));
|
||||
x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 4>::call(x, T(0x3333333333333333ull), static_cast<T>( 2));
|
||||
x = compute_bitfieldReverseStep<sizeof(T) * 8 >= 8>::call(x, T(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4));
|
||||
@@ -230,7 +230,7 @@ namespace bitfieldReverse
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType bitfieldReverseOps(genType x)
|
||||
{
|
||||
return bitfieldReverseOps(glm::tvec1<genType, glm::defaultp>(x)).x;
|
||||
return bitfieldReverseOps(glm::tvec<1, genType, glm::defaultp>(x)).x;
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
@@ -1407,8 +1407,8 @@ namespace bitCount
|
||||
template <bool EXEC = false>
|
||||
struct compute_bitfieldBitCountStep
|
||||
{
|
||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<D, T, P> const & v, T, T)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
@@ -1417,30 +1417,30 @@ namespace bitCount
|
||||
template <>
|
||||
struct compute_bitfieldBitCountStep<true>
|
||||
{
|
||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<D, T, P> const & v, T Mask, T Shift)
|
||||
{
|
||||
return (v & Mask) + ((v >> Shift) & Mask);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<int, P> bitCount_bitfield(vecType<T, P> const & v)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, int, P> bitCount_bitfield(vecType<D, T, P> const & v)
|
||||
{
|
||||
vecType<typename glm::detail::make_unsigned<T>::type, P> x(*reinterpret_cast<vecType<typename glm::detail::make_unsigned<T>::type, P> const *>(&v));
|
||||
vecType<D, typename glm::detail::make_unsigned<T>::type, P> x(*reinterpret_cast<vecType<D, typename glm::detail::make_unsigned<T>::type, P> const *>(&v));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 2>::call(x, typename glm::detail::make_unsigned<T>::type(0x5555555555555555ull), typename glm::detail::make_unsigned<T>::type( 1));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 4>::call(x, typename glm::detail::make_unsigned<T>::type(0x3333333333333333ull), typename glm::detail::make_unsigned<T>::type( 2));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 8>::call(x, typename glm::detail::make_unsigned<T>::type(0x0F0F0F0F0F0F0F0Full), typename glm::detail::make_unsigned<T>::type( 4));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 16>::call(x, typename glm::detail::make_unsigned<T>::type(0x00FF00FF00FF00FFull), typename glm::detail::make_unsigned<T>::type( 8));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 32>::call(x, typename glm::detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename glm::detail::make_unsigned<T>::type(16));
|
||||
x = compute_bitfieldBitCountStep<sizeof(T) * 8 >= 64>::call(x, typename glm::detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename glm::detail::make_unsigned<T>::type(32));
|
||||
return vecType<int, P>(x);
|
||||
return vecType<D, int, P>(x);
|
||||
}
|
||||
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER int bitCount_bitfield(genType x)
|
||||
{
|
||||
return bitCount_bitfield(glm::tvec1<genType, glm::defaultp>(x)).x;
|
||||
return bitCount_bitfield(glm::tvec<1, genType, glm::defaultp>(x)).x;
|
||||
}
|
||||
|
||||
int perf(std::size_t Size)
|
||||
|
||||
514
test/external/gli/core/convert_func.hpp
vendored
514
test/external/gli/core/convert_func.hpp
vendored
@@ -157,24 +157,24 @@ namespace detail
|
||||
|
||||
// convertFunc class
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType, convertMode mode = CONVERT_MODE_CAST, bool isSamplerFloat = false>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType, convertMode mode = CONVERT_MODE_CAST, bool isSamplerFloat = false>
|
||||
struct convertFunc
|
||||
{
|
||||
typedef accessFunc<textureType, vecType<T, P> > access;
|
||||
typedef accessFunc<textureType, vecType<D, T, P> > access;
|
||||
|
||||
static tvec4<retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
return make_vec4<retType, P>(vecType<retType, P>(access::load(Texture, TexelCoord, Layer, Face, Level)));
|
||||
return make_vec4<retType, P>(vecType<D, retType, P>(access::load(Texture, TexelCoord, Layer, Face, Level)));
|
||||
}
|
||||
|
||||
static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, tvec4<retType, P> const & Texel)
|
||||
{
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, vecType<T, P>(Texel));
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, vecType<D, T, P>(Texel));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType, bool isSamplerFloat>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_DEFAULT, isSamplerFloat>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType, bool isSamplerFloat>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_DEFAULT, isSamplerFloat>
|
||||
{
|
||||
static tvec4<retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
@@ -185,10 +185,10 @@ namespace detail
|
||||
{}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_NORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_NORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, vecType<T, P> > access;
|
||||
typedef accessFunc<textureType, vecType<D, T, P> > access;
|
||||
|
||||
static tvec4<retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
@@ -199,14 +199,14 @@ namespace detail
|
||||
static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, tvec4<retType, P> const & Texel)
|
||||
{
|
||||
static_assert(std::numeric_limits<retType>::is_iec559, "CONVERT_MODE_NORM requires a float sampler");
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, compScale<T>(vecType<retType, P>(Texel)));
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, compScale<T>(vecType<D, retType, P>(Texel)));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_SRGB, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_SRGB, true>
|
||||
{
|
||||
typedef accessFunc<textureType, vecType<T, P> > access;
|
||||
typedef accessFunc<textureType, vecType<D, T, P> > access;
|
||||
|
||||
static tvec4<retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
@@ -217,12 +217,12 @@ namespace detail
|
||||
static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, tvec4<retType, P> const & Texel)
|
||||
{
|
||||
static_assert(std::numeric_limits<retType>::is_iec559, "CONVERT_MODE_SRGB requires a float sampler");
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, gli::compScale<T>(convertLinearToSRGB(vecType<retType, P>(Texel))));
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, gli::compScale<T>(convertLinearToSRGB(vecType<D, retType, P>(Texel))));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB9E5, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB9E5, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -239,8 +239,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RG11B10F, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RG11B10F, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -257,26 +257,26 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_HALF, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_HALF, true>
|
||||
{
|
||||
typedef accessFunc<textureType, vecType<uint16, P> > access;
|
||||
typedef accessFunc<textureType, vecType<D, uint16, P> > access;
|
||||
|
||||
static tvec4<retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
static_assert(std::numeric_limits<retType>::is_iec559, "CONVERT_MODE_HALF requires a float sampler");
|
||||
return make_vec4<retType, P>(vecType<retType, P>(unpackHalf(access::load(Texture, TexelCoord, Layer, Face, Level))));
|
||||
return make_vec4<retType, P>(vecType<D, retType, P>(unpackHalf(access::load(Texture, TexelCoord, Layer, Face, Level))));
|
||||
}
|
||||
|
||||
static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, tvec4<retType, P> const & Texel)
|
||||
{
|
||||
static_assert(std::numeric_limits<retType>::is_iec559, "CONVERT_MODE_HALF requires a float sampler");
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, packHalf(vecType<float, P>(Texel)));
|
||||
access::store(Texture, TexelCoord, Layer, Face, Level, packHalf(vecType<D, float, P>(Texel)));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_44UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_44UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint8> access;
|
||||
|
||||
@@ -293,8 +293,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_4444UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_4444UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint16> access;
|
||||
|
||||
@@ -311,8 +311,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_565UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_565UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint16> access;
|
||||
|
||||
@@ -329,8 +329,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_5551UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_5551UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint16> access;
|
||||
|
||||
@@ -347,8 +347,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_332UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_332UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint8> access;
|
||||
|
||||
@@ -365,8 +365,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2UNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2UNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -383,8 +383,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2SNORM, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2SNORM, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -401,8 +401,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2USCALE, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2USCALE, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -426,8 +426,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2SSCALE, true>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2SSCALE, true>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -451,8 +451,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2UINT, false>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2UINT, false>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -469,8 +469,8 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename textureType, typename retType, typename T, precision P, template <typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, T, P, vecType, CONVERT_MODE_RGB10A2SINT, false>
|
||||
template <typename textureType, typename retType, int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
struct convertFunc<textureType, retType, D, T, P, vecType, CONVERT_MODE_RGB10A2SINT, false>
|
||||
{
|
||||
typedef accessFunc<textureType, uint32> access;
|
||||
|
||||
@@ -493,17 +493,17 @@ namespace detail
|
||||
typedef glm::tvec4<samplerValType, P>(*fetchFunc)(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level);
|
||||
typedef void(*writeFunc)(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, glm::tvec4<samplerValType, P> const & Texel);
|
||||
|
||||
template <typename T, template <typename, precision> class vecType, convertMode mode>
|
||||
template <int D, typename T, template <int, typename, precision> class vecType, convertMode mode>
|
||||
struct conv
|
||||
{
|
||||
static tvec4<samplerValType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level)
|
||||
{
|
||||
return convertFunc<textureType, samplerValType, T, P, vecType, mode, std::numeric_limits<samplerValType>::is_iec559>::fetch(Texture, TexelCoord, Layer, Face, Level);
|
||||
return convertFunc<textureType, samplerValType, D, T, P, vecType, mode, std::numeric_limits<samplerValType>::is_iec559>::fetch(Texture, TexelCoord, Layer, Face, Level);
|
||||
}
|
||||
|
||||
static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, tvec4<samplerValType, P> const & Texel)
|
||||
{
|
||||
convertFunc<textureType, samplerValType, T, P, vecType, mode, std::numeric_limits<samplerValType>::is_iec559>::write(Texture, TexelCoord, Layer, Face, Level, Texel);
|
||||
convertFunc<textureType, samplerValType, D, T, P, vecType, mode, std::numeric_limits<samplerValType>::is_iec559>::write(Texture, TexelCoord, Layer, Face, Level, Texel);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -517,246 +517,246 @@ namespace detail
|
||||
{
|
||||
static func Table[] =
|
||||
{
|
||||
{conv<u8, tvec2, CONVERT_MODE_44UNORM>::fetch, conv<u8, tvec2, CONVERT_MODE_44UNORM>::write}, // FORMAT_RG4_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_4444UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_4444UNORM>::write}, // FORMAT_RGBA4_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_4444UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_4444UNORM>::write}, // FORMAT_BGRA4_UNORM
|
||||
{conv<u8, tvec3, CONVERT_MODE_565UNORM>::fetch, conv<u8, tvec3, CONVERT_MODE_565UNORM>::write}, // FORMAT_R5G6B5_UNORM
|
||||
{conv<u8, tvec3, CONVERT_MODE_565UNORM>::fetch, conv<u8, tvec3, CONVERT_MODE_565UNORM>::write}, // FORMAT_B5G6R5_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_5551UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_5551UNORM>::write}, // FORMAT_RGB5A1_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_5551UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_5551UNORM>::write}, // FORMAT_BGR5A1_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_5551UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_5551UNORM>::write}, // FORMAT_A1RGB5_UNORM
|
||||
{conv<2, u8, tvec, CONVERT_MODE_44UNORM>::fetch, conv<2, u8, tvec, CONVERT_MODE_44UNORM>::write}, // FORMAT_RG4_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_4444UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_4444UNORM>::write}, // FORMAT_RGBA4_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_4444UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_4444UNORM>::write}, // FORMAT_BGRA4_UNORM
|
||||
{conv<3, u8, tvec, CONVERT_MODE_565UNORM>::fetch, conv<3, u8, tvec, CONVERT_MODE_565UNORM>::write}, // FORMAT_R5G6B5_UNORM
|
||||
{conv<3, u8, tvec, CONVERT_MODE_565UNORM>::fetch, conv<3, u8, tvec, CONVERT_MODE_565UNORM>::write}, // FORMAT_B5G6R5_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::write}, // FORMAT_RGB5A1_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::write}, // FORMAT_BGR5A1_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_5551UNORM>::write}, // FORMAT_A1RGB5_UNORM
|
||||
|
||||
{conv<u8, tvec1, CONVERT_MODE_NORM>::fetch, conv<u8, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_R8_UNORM
|
||||
{conv<i8, tvec1, CONVERT_MODE_NORM>::fetch, conv<i8, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_R8_SNORM
|
||||
{conv<u8, tvec1, CONVERT_MODE_CAST>::fetch, conv<u8, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R8_USCALED
|
||||
{conv<i8, tvec1, CONVERT_MODE_CAST>::fetch, conv<i8, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R8_SSCALED
|
||||
{conv<u8, tvec1, CONVERT_MODE_CAST>::fetch, conv<u8, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R8_UINT
|
||||
{conv<i8, tvec1, CONVERT_MODE_CAST>::fetch, conv<i8, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R8_SINT
|
||||
{conv<u8, tvec1, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec1, CONVERT_MODE_SRGB>::write}, // FORMAT_R8_SRGB
|
||||
{conv<1, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_R8_UNORM
|
||||
{conv<1, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<1, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_R8_SNORM
|
||||
{conv<1, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R8_USCALED
|
||||
{conv<1, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R8_SSCALED
|
||||
{conv<1, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R8_UINT
|
||||
{conv<1, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R8_SINT
|
||||
{conv<1, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<1, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_R8_SRGB
|
||||
|
||||
{conv<u8, tvec2, CONVERT_MODE_NORM>::fetch, conv<u8, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_RG8_UNORM
|
||||
{conv<i8, tvec2, CONVERT_MODE_NORM>::fetch, conv<i8, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_RG8_SNORM
|
||||
{conv<u8, tvec2, CONVERT_MODE_CAST>::fetch, conv<u8, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_USCALED
|
||||
{conv<i8, tvec2, CONVERT_MODE_CAST>::fetch, conv<i8, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_SSCALED
|
||||
{conv<u8, tvec2, CONVERT_MODE_CAST>::fetch, conv<u8, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_UINT
|
||||
{conv<i8, tvec2, CONVERT_MODE_CAST>::fetch, conv<i8, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_SINT
|
||||
{conv<u8, tvec2, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec2, CONVERT_MODE_SRGB>::write}, // FORMAT_RG8_SRGB
|
||||
{conv<2, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<2, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RG8_UNORM
|
||||
{conv<2, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<2, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RG8_SNORM
|
||||
{conv<2, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_USCALED
|
||||
{conv<2, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_SSCALED
|
||||
{conv<2, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_UINT
|
||||
{conv<2, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG8_SINT
|
||||
{conv<2, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<2, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_RG8_SRGB
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_NORM>::fetch, conv<u8, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_RGB8_UNORM
|
||||
{conv<i8, tvec3, CONVERT_MODE_NORM>::fetch, conv<i8, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_RGB8_SNORM
|
||||
{conv<u8, tvec3, CONVERT_MODE_CAST>::fetch, conv<u8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_USCALED
|
||||
{conv<i8, tvec3, CONVERT_MODE_CAST>::fetch, conv<i8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_SSCALED
|
||||
{conv<u8, tvec3, CONVERT_MODE_CAST>::fetch, conv<u8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_UINT
|
||||
{conv<i8, tvec3, CONVERT_MODE_CAST>::fetch, conv<i8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_SINT
|
||||
{conv<u8, tvec3, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec3, CONVERT_MODE_SRGB>::write}, // FORMAT_RGB8_SRGB
|
||||
{conv<3, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<3, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGB8_UNORM
|
||||
{conv<3, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<3, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGB8_SNORM
|
||||
{conv<3, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_USCALED
|
||||
{conv<3, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_SSCALED
|
||||
{conv<3, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_UINT
|
||||
{conv<3, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB8_SINT
|
||||
{conv<3, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<3, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_RGB8_SRGB
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_NORM>::fetch, conv<u8, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_BGR8_UNORM
|
||||
{conv<i8, tvec3, CONVERT_MODE_NORM>::fetch, conv<i8, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_BGR8_SNORM
|
||||
{conv<u8, tvec3, CONVERT_MODE_CAST>::fetch, conv<u8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_USCALED
|
||||
{conv<i8, tvec3, CONVERT_MODE_CAST>::fetch, conv<i8, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_SSCALED
|
||||
{conv<u32, tvec3, CONVERT_MODE_CAST>::fetch, conv<u32, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_UINT
|
||||
{conv<i32, tvec3, CONVERT_MODE_CAST>::fetch, conv<i32, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_SINT
|
||||
{conv<u8, tvec3, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec3, CONVERT_MODE_SRGB>::write}, // FORMAT_BGR8_SRGB
|
||||
{conv<3, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<3, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_BGR8_UNORM
|
||||
{conv<3, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<3, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_BGR8_SNORM
|
||||
{conv<3, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_USCALED
|
||||
{conv<3, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_SSCALED
|
||||
{conv<3, u32, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_UINT
|
||||
{conv<3, i32, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGR8_SINT
|
||||
{conv<3, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<3, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_BGR8_SRGB
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_NORM>::fetch, conv<u8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA8_UNORM
|
||||
{conv<i8, tvec4, CONVERT_MODE_NORM>::fetch, conv<i8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA8_SNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_USCALED
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_SSCALED
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_UINT
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_SINT
|
||||
{conv<u8, tvec4, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec4, CONVERT_MODE_SRGB>::write}, // FORMAT_RGBA8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA8_UNORM
|
||||
{conv<4, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA8_SNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_USCALED
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_SSCALED
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_UINT
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA8_SINT
|
||||
{conv<4, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<4, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_RGBA8_SRGB
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_NORM>::fetch, conv<u8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_BGRA8_UNORM
|
||||
{conv<i8, tvec4, CONVERT_MODE_NORM>::fetch, conv<i8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_BGRA8_SNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_USCALED
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_SSCALED
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_UINT
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_SINT
|
||||
{conv<u8, tvec4, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec4, CONVERT_MODE_SRGB>::write}, // FORMAT_BGRA8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_BGRA8_UNORM
|
||||
{conv<4, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_BGRA8_SNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_USCALED
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_SSCALED
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_UINT
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_BGRA8_SINT
|
||||
{conv<4, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<4, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_BGRA8_SRGB
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_NORM>::fetch, conv<u8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_ABGR8_UNORM
|
||||
{conv<i8, tvec4, CONVERT_MODE_NORM>::fetch, conv<i8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_ABGR8_SNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_USCALED
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_SSCALED
|
||||
{conv<u8, tvec4, CONVERT_MODE_CAST>::fetch, conv<u8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_UINT
|
||||
{conv<i8, tvec4, CONVERT_MODE_CAST>::fetch, conv<i8, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_SINT
|
||||
{conv<u8, tvec4, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec4, CONVERT_MODE_SRGB>::write}, // FORMAT_ABGR8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_ABGR8_UNORM
|
||||
{conv<4, i8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, i8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_ABGR8_SNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_USCALED
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_SSCALED
|
||||
{conv<4, u8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_UINT
|
||||
{conv<4, i8, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i8, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_ABGR8_SINT
|
||||
{conv<4, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<4, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_ABGR8_SRGB
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2UNORM>::write}, // FORMAT_RGB10A2_UNORM
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SNORM>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SNORM>::write}, // FORMAT_RGB10A2_SNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2USCALE>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2USCALE>::write}, // FORMAT_RGB10A2_USCALED
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SSCALE>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SSCALE>::write}, // FORMAT_RGB10A2_SSCALED
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2UINT>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2UINT>::write}, // FORMAT_RGB10A2_UINT
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SINT>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SINT>::write}, // FORMAT_RGB10A2_SINT
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2UNORM>::write}, // FORMAT_RGB10A2_UNORM
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SNORM>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SNORM>::write}, // FORMAT_RGB10A2_SNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2USCALE>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2USCALE>::write}, // FORMAT_RGB10A2_USCALED
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SSCALE>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SSCALE>::write}, // FORMAT_RGB10A2_SSCALED
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2UINT>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2UINT>::write}, // FORMAT_RGB10A2_UINT
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SINT>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SINT>::write}, // FORMAT_RGB10A2_SINT
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2UNORM>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2UNORM>::write}, // FORMAT_BGR10A2_UNORM
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SNORM>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SNORM>::write}, // FORMAT_BGR10A2_SNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2USCALE>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2USCALE>::write}, // FORMAT_BGR10A2_USCALED
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SSCALE>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SSCALE>::write}, // FORMAT_BGR10A2_SSCALED
|
||||
{conv<u8, tvec4, CONVERT_MODE_RGB10A2UINT>::fetch, conv<u8, tvec4, CONVERT_MODE_RGB10A2UINT>::write}, // FORMAT_BGR10A2_UINT
|
||||
{conv<i8, tvec4, CONVERT_MODE_RGB10A2SINT>::fetch, conv<i8, tvec4, CONVERT_MODE_RGB10A2SINT>::write}, // FORMAT_BGR10A2_SINT
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2UNORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2UNORM>::write}, // FORMAT_BGR10A2_UNORM
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SNORM>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SNORM>::write}, // FORMAT_BGR10A2_SNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2USCALE>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2USCALE>::write}, // FORMAT_BGR10A2_USCALED
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SSCALE>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SSCALE>::write}, // FORMAT_BGR10A2_SSCALED
|
||||
{conv<4, u8, tvec, CONVERT_MODE_RGB10A2UINT>::fetch, conv<4, u8, tvec, CONVERT_MODE_RGB10A2UINT>::write}, // FORMAT_BGR10A2_UINT
|
||||
{conv<4, i8, tvec, CONVERT_MODE_RGB10A2SINT>::fetch, conv<4, i8, tvec, CONVERT_MODE_RGB10A2SINT>::write}, // FORMAT_BGR10A2_SINT
|
||||
|
||||
{conv<u16, tvec1, CONVERT_MODE_NORM>::fetch, conv<u16, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_R16_UNORM_PACK16
|
||||
{conv<i16, tvec1, CONVERT_MODE_NORM>::fetch, conv<i16, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_R16_SNORM_PACK16
|
||||
{conv<u16, tvec1, CONVERT_MODE_CAST>::fetch, conv<u16, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R16_USCALED_PACK16
|
||||
{conv<i16, tvec1, CONVERT_MODE_CAST>::fetch, conv<i16, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R16_SSCALED_PACK16
|
||||
{conv<u16, tvec1, CONVERT_MODE_CAST>::fetch, conv<u16, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R16_UINT_PACK16
|
||||
{conv<i16, tvec1, CONVERT_MODE_CAST>::fetch, conv<i16, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R16_SINT_PACK16
|
||||
{conv<u16, tvec1, CONVERT_MODE_HALF>::fetch, conv<u16, tvec1, CONVERT_MODE_HALF>::write}, // FORMAT_R16_SFLOAT_PACK16
|
||||
{conv<1, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_R16_UNORM_PACK16
|
||||
{conv<1, i16, tvec, CONVERT_MODE_NORM>::fetch, conv<1, i16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_R16_SNORM_PACK16
|
||||
{conv<1, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R16_USCALED_PACK16
|
||||
{conv<1, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R16_SSCALED_PACK16
|
||||
{conv<1, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R16_UINT_PACK16
|
||||
{conv<1, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R16_SINT_PACK16
|
||||
{conv<1, u16, tvec, CONVERT_MODE_HALF>::fetch, conv<1, u16, tvec, CONVERT_MODE_HALF>::write}, // FORMAT_R16_SFLOAT_PACK16
|
||||
|
||||
{conv<u16, tvec2, CONVERT_MODE_NORM>::fetch, conv<u16, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_RG16_UNORM_PACK16
|
||||
{conv<i16, tvec2, CONVERT_MODE_NORM>::fetch, conv<i16, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_RG16_SNORM_PACK16
|
||||
{conv<u16, tvec2, CONVERT_MODE_CAST>::fetch, conv<u16, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_USCALED_PACK16
|
||||
{conv<i16, tvec2, CONVERT_MODE_CAST>::fetch, conv<i16, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_SSCALED_PACK16
|
||||
{conv<u16, tvec2, CONVERT_MODE_CAST>::fetch, conv<u16, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_UINT_PACK16
|
||||
{conv<i16, tvec2, CONVERT_MODE_CAST>::fetch, conv<i16, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_SINT_PACK16
|
||||
{conv<u16, tvec2, CONVERT_MODE_HALF>::fetch, conv<u16, tvec2, CONVERT_MODE_HALF>::write}, // FORMAT_RG16_SFLOAT_PACK16
|
||||
{conv<2, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<2, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RG16_UNORM_PACK16
|
||||
{conv<2, i16, tvec, CONVERT_MODE_NORM>::fetch, conv<2, i16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RG16_SNORM_PACK16
|
||||
{conv<2, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_USCALED_PACK16
|
||||
{conv<2, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_SSCALED_PACK16
|
||||
{conv<2, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_UINT_PACK16
|
||||
{conv<2, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG16_SINT_PACK16
|
||||
{conv<2, u16, tvec, CONVERT_MODE_HALF>::fetch, conv<2, u16, tvec, CONVERT_MODE_HALF>::write}, // FORMAT_RG16_SFLOAT_PACK16
|
||||
|
||||
{conv<u16, tvec3, CONVERT_MODE_NORM>::fetch, conv<u16, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_RGB16_UNORM_PACK16
|
||||
{conv<i16, tvec3, CONVERT_MODE_NORM>::fetch, conv<i16, tvec3, CONVERT_MODE_NORM>::write}, // FORMAT_RGB16_SNORM_PACK16
|
||||
{conv<u16, tvec3, CONVERT_MODE_CAST>::fetch, conv<u16, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_USCALED_PACK16
|
||||
{conv<i16, tvec3, CONVERT_MODE_CAST>::fetch, conv<i16, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_SSCALED_PACK16
|
||||
{conv<u16, tvec3, CONVERT_MODE_CAST>::fetch, conv<u16, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_UINT_PACK16
|
||||
{conv<i16, tvec3, CONVERT_MODE_CAST>::fetch, conv<i16, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_SINT_PACK16
|
||||
{conv<u16, tvec3, CONVERT_MODE_HALF>::fetch, conv<u16, tvec3, CONVERT_MODE_HALF>::write}, // FORMAT_RGB16_SFLOAT_PACK16
|
||||
{conv<3, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<3, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGB16_UNORM_PACK16
|
||||
{conv<3, i16, tvec, CONVERT_MODE_NORM>::fetch, conv<3, i16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGB16_SNORM_PACK16
|
||||
{conv<3, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_USCALED_PACK16
|
||||
{conv<3, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_SSCALED_PACK16
|
||||
{conv<3, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_UINT_PACK16
|
||||
{conv<3, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB16_SINT_PACK16
|
||||
{conv<3, u16, tvec, CONVERT_MODE_HALF>::fetch, conv<3, u16, tvec, CONVERT_MODE_HALF>::write}, // FORMAT_RGB16_SFLOAT_PACK16
|
||||
|
||||
{conv<u16, tvec4, CONVERT_MODE_NORM>::fetch, conv<u16, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA16_UNORM_PACK16
|
||||
{conv<i16, tvec4, CONVERT_MODE_NORM>::fetch, conv<i16, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA16_SNORM_PACK16
|
||||
{conv<u16, tvec4, CONVERT_MODE_CAST>::fetch, conv<u16, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_USCALED_PACK16
|
||||
{conv<i16, tvec4, CONVERT_MODE_CAST>::fetch, conv<i16, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_SSCALED_PACK16
|
||||
{conv<u16, tvec4, CONVERT_MODE_CAST>::fetch, conv<u16, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_UINT_PACK16
|
||||
{conv<i16, tvec4, CONVERT_MODE_CAST>::fetch, conv<i16, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_SINT_PACK16
|
||||
{conv<u16, tvec4, CONVERT_MODE_HALF>::fetch, conv<u16, tvec4, CONVERT_MODE_HALF>::write}, // FORMAT_RGBA16_SFLOAT_PACK16
|
||||
{conv<4, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<4, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA16_UNORM_PACK16
|
||||
{conv<4, i16, tvec, CONVERT_MODE_NORM>::fetch, conv<4, i16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_RGBA16_SNORM_PACK16
|
||||
{conv<4, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_USCALED_PACK16
|
||||
{conv<4, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_SSCALED_PACK16
|
||||
{conv<4, u16, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_UINT_PACK16
|
||||
{conv<4, i16, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i16, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA16_SINT_PACK16
|
||||
{conv<4, u16, tvec, CONVERT_MODE_HALF>::fetch, conv<4, u16, tvec, CONVERT_MODE_HALF>::write}, // FORMAT_RGBA16_SFLOAT_PACK16
|
||||
|
||||
{conv<u32, tvec1, CONVERT_MODE_CAST>::fetch, conv<u32, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R32_UINT_PACK32
|
||||
{conv<i32, tvec1, CONVERT_MODE_CAST>::fetch, conv<i32, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R32_SINT_PACK32
|
||||
{conv<f32, tvec1, CONVERT_MODE_CAST>::fetch, conv<f32, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R32_SFLOAT_PACK32
|
||||
{conv<1, u32, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R32_UINT_PACK32
|
||||
{conv<1, i32, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R32_SINT_PACK32
|
||||
{conv<1, f32, tvec, CONVERT_MODE_CAST>::fetch, conv<1, f32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R32_SFLOAT_PACK32
|
||||
|
||||
{conv<u32, tvec2, CONVERT_MODE_CAST>::fetch, conv<u32, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_UINT_PACK32
|
||||
{conv<i32, tvec2, CONVERT_MODE_CAST>::fetch, conv<i32, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_SINT_PACK32
|
||||
{conv<f32, tvec2, CONVERT_MODE_CAST>::fetch, conv<f32, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_SFLOAT_PACK32
|
||||
{conv<2, u32, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_UINT_PACK32
|
||||
{conv<2, i32, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_SINT_PACK32
|
||||
{conv<2, f32, tvec, CONVERT_MODE_CAST>::fetch, conv<2, f32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG32_SFLOAT_PACK32
|
||||
|
||||
{conv<u32, tvec3, CONVERT_MODE_CAST>::fetch, conv<u32, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_UINT_PACK32
|
||||
{conv<i32, tvec3, CONVERT_MODE_CAST>::fetch, conv<i32, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_SINT_PACK32
|
||||
{conv<f32, tvec3, CONVERT_MODE_CAST>::fetch, conv<f32, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_SFLOAT_PACK32
|
||||
{conv<3, u32, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_UINT_PACK32
|
||||
{conv<3, i32, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_SINT_PACK32
|
||||
{conv<3, f32, tvec, CONVERT_MODE_CAST>::fetch, conv<3, f32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB32_SFLOAT_PACK32
|
||||
|
||||
{conv<u32, tvec4, CONVERT_MODE_CAST>::fetch, conv<u32, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_UINT_PACK32
|
||||
{conv<i32, tvec4, CONVERT_MODE_CAST>::fetch, conv<i32, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_SINT_PACK32
|
||||
{conv<f32, tvec4, CONVERT_MODE_CAST>::fetch, conv<f32, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_SFLOAT_PACK32
|
||||
{conv<4, u32, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_UINT_PACK32
|
||||
{conv<4, i32, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_SINT_PACK32
|
||||
{conv<4, f32, tvec, CONVERT_MODE_CAST>::fetch, conv<4, f32, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA32_SFLOAT_PACK32
|
||||
|
||||
{conv<u64, tvec1, CONVERT_MODE_CAST>::fetch, conv<u64, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R64_UINT_PACK64
|
||||
{conv<i64, tvec1, CONVERT_MODE_CAST>::fetch, conv<i64, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R64_SINT_PACK64
|
||||
{conv<f64, tvec1, CONVERT_MODE_CAST>::fetch, conv<f64, tvec1, CONVERT_MODE_CAST>::write}, // FORMAT_R64_SFLOAT_PACK64
|
||||
{conv<1, u64, tvec, CONVERT_MODE_CAST>::fetch, conv<1, u64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R64_UINT_PACK64
|
||||
{conv<1, i64, tvec, CONVERT_MODE_CAST>::fetch, conv<1, i64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R64_SINT_PACK64
|
||||
{conv<1, f64, tvec, CONVERT_MODE_CAST>::fetch, conv<1, f64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_R64_SFLOAT_PACK64
|
||||
|
||||
{conv<u64, tvec2, CONVERT_MODE_CAST>::fetch, conv<u64, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_UINT_PACK64
|
||||
{conv<i64, tvec2, CONVERT_MODE_CAST>::fetch, conv<i64, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_SINT_PACK64
|
||||
{conv<f64, tvec2, CONVERT_MODE_CAST>::fetch, conv<f64, tvec2, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_SFLOAT_PACK64
|
||||
{conv<2, u64, tvec, CONVERT_MODE_CAST>::fetch, conv<2, u64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_UINT_PACK64
|
||||
{conv<2, i64, tvec, CONVERT_MODE_CAST>::fetch, conv<2, i64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_SINT_PACK64
|
||||
{conv<2, f64, tvec, CONVERT_MODE_CAST>::fetch, conv<2, f64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RG64_SFLOAT_PACK64
|
||||
|
||||
{conv<u64, tvec3, CONVERT_MODE_CAST>::fetch, conv<u64, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_UINT_PACK64
|
||||
{conv<i64, tvec3, CONVERT_MODE_CAST>::fetch, conv<i64, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_SINT_PACK64
|
||||
{conv<f64, tvec3, CONVERT_MODE_CAST>::fetch, conv<f64, tvec3, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_SFLOAT_PACK64
|
||||
{conv<3, u64, tvec, CONVERT_MODE_CAST>::fetch, conv<3, u64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_UINT_PACK64
|
||||
{conv<3, i64, tvec, CONVERT_MODE_CAST>::fetch, conv<3, i64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_SINT_PACK64
|
||||
{conv<3, f64, tvec, CONVERT_MODE_CAST>::fetch, conv<3, f64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGB64_SFLOAT_PACK64
|
||||
|
||||
{conv<u64, tvec4, CONVERT_MODE_CAST>::fetch, conv<u64, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_UINT_PACK64
|
||||
{conv<i64, tvec4, CONVERT_MODE_CAST>::fetch, conv<i64, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_SINT_PACK64
|
||||
{conv<f64, tvec4, CONVERT_MODE_CAST>::fetch, conv<f64, tvec4, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_SFLOAT_PACK64
|
||||
{conv<4, u64, tvec, CONVERT_MODE_CAST>::fetch, conv<4, u64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_UINT_PACK64
|
||||
{conv<4, i64, tvec, CONVERT_MODE_CAST>::fetch, conv<4, i64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_SINT_PACK64
|
||||
{conv<4, f64, tvec, CONVERT_MODE_CAST>::fetch, conv<4, f64, tvec, CONVERT_MODE_CAST>::write}, // FORMAT_RGBA64_SFLOAT_PACK64
|
||||
|
||||
{conv<u32, tvec1, CONVERT_MODE_RG11B10F>::fetch, conv<u32, tvec1, CONVERT_MODE_RG11B10F>::write}, // FORMAT_RG11B10_UFLOAT
|
||||
{conv<u32, tvec1, CONVERT_MODE_RGB9E5>::fetch, conv<u32, tvec1, CONVERT_MODE_RGB9E5>::write}, // FORMAT_RGB9E5_UFLOAT
|
||||
{conv<1, u32, tvec, CONVERT_MODE_RG11B10F>::fetch, conv<1, u32, tvec, CONVERT_MODE_RG11B10F>::write}, // FORMAT_RG11B10_UFLOAT
|
||||
{conv<1, u32, tvec, CONVERT_MODE_RGB9E5>::fetch, conv<1, u32, tvec, CONVERT_MODE_RGB9E5>::write}, // FORMAT_RGB9E5_UFLOAT
|
||||
|
||||
{conv<u16, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u16, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D16_UNORM_PACK16
|
||||
{conv<u32, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u32, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D24_UNORM
|
||||
{conv<float, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<float, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D32_SFLOAT_PACK32
|
||||
{conv<u8, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_S8_UINT_PACK8
|
||||
{conv<u16, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u16, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D16_UNORM_S8_UINT_PACK32
|
||||
{conv<u32, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u32, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D24_UNORM_S8_UINT_PACK32
|
||||
{conv<u32, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u32, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D32_SFLOAT_S8_UINT_PACK64
|
||||
{conv<1, u16, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u16, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D16_UNORM_PACK16
|
||||
{conv<1, u32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D24_UNORM
|
||||
{conv<1, f32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, f32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D32_SFLOAT_PACK32
|
||||
{conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_S8_UINT_PACK8
|
||||
{conv<2, u16, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u16, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D16_UNORM_S8_UINT_PACK32
|
||||
{conv<2, u32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D24_UNORM_S8_UINT_PACK32
|
||||
{conv<2, u32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_D32_SFLOAT_S8_UINT_PACK64
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_DXT1_UNORM_BLOCK8
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_DXT1_SRGB_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT1_UNORM_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT1_SRGB_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT3_UNORM_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT3_SRGB_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT5_UNORM_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT5_SRGB_BLOCK16
|
||||
{conv<u8, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_ATI1N_UNORM_BLOCK8
|
||||
{conv<u8, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<i8, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_ATI1N_SNORM_BLOCK8
|
||||
{conv<u8, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_ATI2N_UNORM_BLOCK16
|
||||
{conv<u8, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<i8, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_ATI2N_SNORM_BLOCK16
|
||||
{conv<float, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<float, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_BP_UFLOAT_BLOCK16
|
||||
{conv<float, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<float, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_BP_SFLOAT_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_BP_UNORM_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_BP_SRGB_BLOCK16
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_DXT1_UNORM_BLOCK8
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_DXT1_SRGB_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT1_UNORM_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT1_SRGB_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT3_UNORM_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT3_SRGB_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT5_UNORM_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_DXT5_SRGB_BLOCK16
|
||||
{conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_ATI1N_UNORM_BLOCK8
|
||||
{conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, i8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_ATI1N_SNORM_BLOCK8
|
||||
{conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_ATI2N_UNORM_BLOCK16
|
||||
{conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, i8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_ATI2N_SNORM_BLOCK16
|
||||
{conv<3, f32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, f32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_BP_UFLOAT_BLOCK16
|
||||
{conv<3, f32, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, f32, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_BP_SFLOAT_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_BP_UNORM_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_BP_SRGB_BLOCK16
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC2_UNORM_BLOCK8
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC2_SRGB_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_A1_UNORM_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_A1_SRGB_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_UNORM_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_SRGB_BLOCK16
|
||||
{conv<u8, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_EAC_UNORM_BLOCK8
|
||||
{conv<u8, tvec1, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec1, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_EAC_SNORM_BLOCK8
|
||||
{conv<u8, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_EAC_UNORM_BLOCK16
|
||||
{conv<u8, tvec2, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec2, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_EAC_SNORM_BLOCK16
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC2_UNORM_BLOCK8
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC2_SRGB_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_A1_UNORM_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_A1_SRGB_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_UNORM_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ETC2_SRGB_BLOCK16
|
||||
{conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_EAC_UNORM_BLOCK8
|
||||
{conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<1, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_R_EAC_SNORM_BLOCK8
|
||||
{conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_EAC_UNORM_BLOCK16
|
||||
{conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<2, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RG_EAC_SNORM_BLOCK16
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_4x4_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_4x4_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x4_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x4_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x5_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x5_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x5_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x5_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x6_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x6_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x5_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x5_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x6_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x6_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x8_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x8_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x5_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x5_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x6_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x6_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x8_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x8_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x10_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x10_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x10_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x10_SRGB
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x12_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x12_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_4x4_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_4x4_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x4_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x4_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x5_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_5x5_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x5_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x5_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x6_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_6x6_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x5_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x5_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x6_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x6_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x8_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_8x8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x5_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x5_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x6_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x6_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x8_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x10_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_10x10_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x10_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x10_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x12_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_ASTC_12x12_SRGB
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_8X8_UNORM_BLOCK32
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_8X8_SRGB_BLOCK32
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_16X8_UNORM_BLOCK32
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_16X8_SRGB_BLOCK32
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_8X8_UNORM_BLOCK32
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_8X8_SRGB_BLOCK32
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_16X8_UNORM_BLOCK32
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_16X8_SRGB_BLOCK32
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_4X4_UNORM_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_4X4_SRGB_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_8X4_UNORM_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_8X4_SRGB_BLOCK8
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_8X8_UNORM_BLOCK32
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_8X8_SRGB_BLOCK32
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_16X8_UNORM_BLOCK32
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_PVRTC1_16X8_SRGB_BLOCK32
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_8X8_UNORM_BLOCK32
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_8X8_SRGB_BLOCK32
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_16X8_UNORM_BLOCK32
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC1_16X8_SRGB_BLOCK32
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_4X4_UNORM_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_4X4_SRGB_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_8X4_UNORM_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_PVRTC2_8X4_SRGB_BLOCK8
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC_UNORM_BLOCK8
|
||||
{conv<u8, tvec3, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec3, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ATC_UNORM_BLOCK8
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ATCA_UNORM_BLOCK16
|
||||
{conv<u8, tvec4, CONVERT_MODE_DEFAULT>::fetch, conv<u8, tvec4, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ATCI_UNORM_BLOCK16
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ETC_UNORM_BLOCK8
|
||||
{conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<3, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGB_ATC_UNORM_BLOCK8
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ATCA_UNORM_BLOCK16
|
||||
{conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::fetch, conv<4, u8, tvec, CONVERT_MODE_DEFAULT>::write}, // FORMAT_RGBA_ATCI_UNORM_BLOCK16
|
||||
|
||||
{conv<u8, tvec1, CONVERT_MODE_NORM>::fetch, conv<u8, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_L8_UNORM_PACK8
|
||||
{conv<u8, tvec1, CONVERT_MODE_NORM>::fetch, conv<u8, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_A8_UNORM_PACK8
|
||||
{conv<u8, tvec2, CONVERT_MODE_NORM>::fetch, conv<u8, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_LA8_UNORM_PACK8
|
||||
{conv<u16, tvec1, CONVERT_MODE_NORM>::fetch, conv<u16, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_L16_UNORM_PACK16
|
||||
{conv<u16, tvec1, CONVERT_MODE_NORM>::fetch, conv<u16, tvec1, CONVERT_MODE_NORM>::write}, // FORMAT_A16_UNORM_PACK16
|
||||
{conv<u16, tvec2, CONVERT_MODE_NORM>::fetch, conv<u16, tvec2, CONVERT_MODE_NORM>::write}, // FORMAT_LA16_UNORM_PACK16
|
||||
{conv<1, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_L8_UNORM_PACK8
|
||||
{conv<1, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_A8_UNORM_PACK8
|
||||
{conv<2, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<2, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_LA8_UNORM_PACK8
|
||||
{conv<1, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_L16_UNORM_PACK16
|
||||
{conv<1, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<1, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_A16_UNORM_PACK16
|
||||
{conv<2, u16, tvec, CONVERT_MODE_NORM>::fetch, conv<2, u16, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_LA16_UNORM_PACK16
|
||||
|
||||
{conv<u8, tvec4, CONVERT_MODE_NORM>::fetch, conv<u8, tvec4, CONVERT_MODE_NORM>::write}, // FORMAT_BGRX8_UNORM
|
||||
{conv<u8, tvec4, CONVERT_MODE_SRGB>::fetch, conv<u8, tvec4, CONVERT_MODE_SRGB>::write}, // FORMAT_BGRX8_SRGB
|
||||
{conv<4, u8, tvec, CONVERT_MODE_NORM>::fetch, conv<4, u8, tvec, CONVERT_MODE_NORM>::write}, // FORMAT_BGRX8_UNORM
|
||||
{conv<4, u8, tvec, CONVERT_MODE_SRGB>::fetch, conv<4, u8, tvec, CONVERT_MODE_SRGB>::write}, // FORMAT_BGRX8_SRGB
|
||||
|
||||
{conv<u8, tvec3, CONVERT_MODE_332UNORM>::fetch, conv<u8, tvec3, CONVERT_MODE_332UNORM>::write} // FORMAT_RG3B2_UNORM
|
||||
{conv<3, u8, tvec, CONVERT_MODE_332UNORM>::fetch, conv<3, u8, tvec, CONVERT_MODE_332UNORM>::write} // FORMAT_RG3B2_UNORM
|
||||
};
|
||||
static_assert(sizeof(Table) / sizeof(Table[0]) == FORMAT_COUNT, "Texel functions need to be updated");
|
||||
|
||||
|
||||
4
test/external/gli/core/coord.hpp
vendored
4
test/external/gli/core/coord.hpp
vendored
@@ -5,8 +5,8 @@
|
||||
namespace gli{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
inline vecType<bool, P> in_interval(vecType<T, P> const& Value, vecType<T, P> const& Min, vecType<T, P> const& Max)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
inline vecType<D, bool, P> in_interval(vecType<D, T, P> const& Value, vecType<D, T, P> const& Min, vecType<D, T, P> const& Max)
|
||||
{
|
||||
return greaterThanEqual(Value, Min) && lessThanEqual(Value, Max);
|
||||
}
|
||||
|
||||
2
test/external/gli/core/format.inl
vendored
2
test/external/gli/core/format.inl
vendored
@@ -282,7 +282,7 @@ namespace detail
|
||||
GLI_ASSERT(Format != static_cast<format>(FORMAT_INVALID));
|
||||
|
||||
return Table[Format - FORMAT_FIRST];
|
||||
};
|
||||
}
|
||||
|
||||
inline std::uint32_t bits_per_pixel(format Format)
|
||||
{
|
||||
|
||||
4
test/external/gli/core/levels.inl
vendored
4
test/external/gli/core/levels.inl
vendored
@@ -3,8 +3,8 @@
|
||||
|
||||
namespace gli
|
||||
{
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
inline T levels(vecType<T, P> const& Extent)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
inline T levels(vecType<D, T, P> const& Extent)
|
||||
{
|
||||
return glm::log2(compMax(Extent)) + static_cast<T>(1);
|
||||
}
|
||||
|
||||
62
test/external/gli/core/workaround.hpp
vendored
62
test/external/gli/core/workaround.hpp
vendored
@@ -73,14 +73,14 @@ namespace detail
|
||||
uint32 pack;
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType, bool isInteger, bool signedType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType, bool isInteger, bool signedType>
|
||||
struct compute_compNormalize
|
||||
{};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compNormalize<T, floatType, P, vecType, true, true>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<T, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<D, T, P> const & v)
|
||||
{
|
||||
floatType const Min = static_cast<floatType>(std::numeric_limits<T>::min());
|
||||
floatType const Max = static_cast<floatType>(std::numeric_limits<T>::max());
|
||||
@@ -88,59 +88,59 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compNormalize<T, floatType, P, vecType, true, false>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<T, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<D, T, P> const & v)
|
||||
{
|
||||
return vecType<floatType, P>(v) / static_cast<floatType>(std::numeric_limits<T>::max());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compNormalize<T, floatType, P, vecType, false, true>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<T, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<floatType, P> call(vecType<D, T, P> const & v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType, bool isInteger, bool signedType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType, bool isInteger, bool signedType>
|
||||
struct compute_compScale
|
||||
{};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compScale<T, floatType, P, vecType, true, true>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<floatType, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<floatType, P> const & v)
|
||||
{
|
||||
floatType const Max = static_cast<floatType>(std::numeric_limits<T>::max()) + static_cast<floatType>(0.5);
|
||||
vecType<floatType, P> const Scaled(v * Max);
|
||||
vecType<T, P> const Result(Scaled - static_cast<floatType>(0.5));
|
||||
vecType<D, T, P> const Result(Scaled - static_cast<floatType>(0.5));
|
||||
return Result;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compScale<T, floatType, P, vecType, true, false>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<floatType, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<floatType, P> const & v)
|
||||
{
|
||||
return vecType<T, P>(vecType<floatType, P>(v) * static_cast<floatType>(std::numeric_limits<T>::max()));
|
||||
return vecType<D, T, P>(vecType<floatType, P>(v) * static_cast<floatType>(std::numeric_limits<T>::max()));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_compScale<T, floatType, P, vecType, false, true>
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<floatType, P> const & v)
|
||||
GLM_FUNC_QUALIFIER static vecType<D, T, P> call(vecType<floatType, P> const & v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
template <precision P, template <typename, precision> class vecType>
|
||||
template <int D, precision P, template <int, typename, precision> class vecType>
|
||||
struct compute_half
|
||||
{};
|
||||
|
||||
@@ -223,38 +223,38 @@ namespace detail
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
template <typename floatType, typename T, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<floatType, P> compNormalize(vecType<T, P> const & v)
|
||||
template <typename floatType, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<floatType, P> compNormalize(vecType<D, T, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<floatType>::is_iec559, "'compNormalize' accepts only floating-point types for 'floatType' template parameter");
|
||||
|
||||
return detail::compute_compNormalize<T, floatType, P, vecType, std::numeric_limits<T>::is_integer, std::numeric_limits<T>::is_signed>::call(v);
|
||||
}
|
||||
|
||||
template <typename T, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> compScale(vecType<floatType, P> const & v)
|
||||
template <typename T, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> compScale(vecType<floatType, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<floatType>::is_iec559, "'compScale' accepts only floating-point types for 'floatType' template parameter");
|
||||
|
||||
return detail::compute_compScale<T, floatType, P, vecType, std::numeric_limits<T>::is_integer, std::numeric_limits<T>::is_signed>::call(v);
|
||||
}
|
||||
|
||||
template <typename uintType, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<uintType, P> packUnorm(vecType<floatType, P> const & v)
|
||||
template <typename uintType, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, uintType, P> packUnorm(vecType<floatType, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<floatType>::is_iec559, "floatType must be a floating point type");
|
||||
|
||||
return vecType<uintType, P>(round(clamp(v, static_cast<floatType>(0), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<uintType>::max())));
|
||||
return vecType<D, uintType, P>(round(clamp(v, static_cast<floatType>(0), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<uintType>::max())));
|
||||
}
|
||||
|
||||
template <typename uintType, typename floatType, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<floatType, P> unpackUnorm(vecType<uintType, P> const & v)
|
||||
template <typename uintType, typename floatType, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<floatType, P> unpackUnorm(vecType<D, uintType, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<floatType>::is_iec559, "floatType must be a floating point type");
|
||||
|
||||
return vecType<float, P>(v) * (static_cast<floatType>(1) / static_cast<floatType>(std::numeric_limits<uintType>::max()));
|
||||
return vecType<D, float, P>(v) * (static_cast<floatType>(1) / static_cast<floatType>(std::numeric_limits<uintType>::max()));
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER uint8 packUnorm2x3_1x2(vec3 const & v)
|
||||
@@ -376,14 +376,14 @@ namespace detail
|
||||
return vec3(Unpack.data.x, Unpack.data.y, Unpack.data.z) * pow(2.0f, Unpack.data.w - 15.f - 9.f);
|
||||
}
|
||||
|
||||
template <precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<uint16, P> packHalf(vecType<float, P> const & v)
|
||||
template <int D, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, uint16, P> packHalf(vecType<D, float, P> const & v)
|
||||
{
|
||||
return detail::compute_half<P, vecType>::pack(v);
|
||||
}
|
||||
|
||||
template <precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<float, P> unpackHalf(vecType<uint16, P> const & v)
|
||||
template <int D, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, float, P> unpackHalf(vecType<D, uint16, P> const & v)
|
||||
{
|
||||
return detail::compute_half<P, vecType>::unpack(v);
|
||||
}
|
||||
|
||||
4
test/external/gli/levels.hpp
vendored
4
test/external/gli/levels.hpp
vendored
@@ -18,8 +18,8 @@ namespace gli
|
||||
/// gli::texture2d::extent_type Extent(32, 10);
|
||||
/// gli::texture2d Texture(gli::levels(Extent));
|
||||
/// @endcode
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
T levels(vecType<T, P> const& Extent);
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
T levels(vecType<D, T, P> const& Extent);
|
||||
/*
|
||||
/// Compute the number of mipmaps levels necessary to create a mipmap complete texture
|
||||
///
|
||||
|
||||
@@ -528,8 +528,8 @@ int test_packUnorm()
|
||||
for(std::size_t i = 0; i < A.size(); ++i)
|
||||
{
|
||||
glm::vec2 B(A[i]);
|
||||
glm::u16vec2 C = glm::packUnorm<glm::uint16>(B);
|
||||
glm::vec2 D = glm::unpackUnorm<glm::uint16, float>(C);
|
||||
glm::u16vec2 C = glm::packUnorm<2, glm::uint16>(B);
|
||||
glm::vec2 D = glm::unpackUnorm<2, glm::uint16, float>(C);
|
||||
Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 255.f)) ? 0 : 1;
|
||||
assert(!Error);
|
||||
}
|
||||
@@ -549,8 +549,8 @@ int test_packSnorm()
|
||||
for(std::size_t i = 0; i < A.size(); ++i)
|
||||
{
|
||||
glm::vec2 B(A[i]);
|
||||
glm::i16vec2 C = glm::packSnorm<glm::int16>(B);
|
||||
glm::vec2 D = glm::unpackSnorm<glm::int16, float>(C);
|
||||
glm::i16vec2 C = glm::packSnorm<2, glm::int16>(B);
|
||||
glm::vec2 D = glm::unpackSnorm<2, glm::int16, float>(C);
|
||||
Error += glm::all(glm::epsilonEqual(B, D, 1.0f / 32767.0f * 2.0f)) ? 0 : 1;
|
||||
assert(!Error);
|
||||
}
|
||||
|
||||
@@ -173,15 +173,17 @@ namespace fastAtan
|
||||
|
||||
namespace taylorCos
|
||||
{
|
||||
using glm::precision;
|
||||
|
||||
glm::vec4 const AngleShift(0.0f, glm::pi<float>() * 0.5f, glm::pi<float>() * 1.0f, glm::pi<float>() * 1.5f);
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> taylorSeriesNewCos(vecType<T, P> const & x)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> taylorSeriesNewCos(vecType<D, T, P> const & x)
|
||||
{
|
||||
vecType<T, P> const Powed2(x * x);
|
||||
vecType<T, P> const Powed4(Powed2 * Powed2);
|
||||
vecType<T, P> const Powed6(Powed4 * Powed2);
|
||||
vecType<T, P> const Powed8(Powed4 * Powed4);
|
||||
vecType<D, T, P> const Powed2(x * x);
|
||||
vecType<D, T, P> const Powed4(Powed2 * Powed2);
|
||||
vecType<D, T, P> const Powed6(Powed4 * Powed2);
|
||||
vecType<D, T, P> const Powed8(Powed4 * Powed4);
|
||||
|
||||
return static_cast<T>(1)
|
||||
- Powed2 * static_cast<T>(0.5)
|
||||
@@ -190,12 +192,12 @@ namespace taylorCos
|
||||
+ Powed8 * static_cast<T>(2.4801587301587301587301587301587e-5);
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> taylorSeriesNewCos6(vecType<T, P> const & x)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> taylorSeriesNewCos6(vecType<D, T, P> const & x)
|
||||
{
|
||||
vecType<T, P> const Powed2(x * x);
|
||||
vecType<T, P> const Powed4(Powed2 * Powed2);
|
||||
vecType<T, P> const Powed6(Powed4 * Powed2);
|
||||
vecType<D, T, P> const Powed2(x * x);
|
||||
vecType<D, T, P> const Powed4(Powed2 * Powed2);
|
||||
vecType<D, T, P> const Powed6(Powed4 * Powed2);
|
||||
|
||||
return static_cast<T>(1)
|
||||
- Powed2 * static_cast<T>(0.5)
|
||||
@@ -203,8 +205,8 @@ namespace taylorCos
|
||||
- Powed6 * static_cast<T>(0.00138888888888888888888888888889);
|
||||
}
|
||||
|
||||
template <glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<float, P> fastAbs(vecType<float, P> x)
|
||||
template <int D, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, float, P> fastAbs(vecType<D, float, P> x)
|
||||
{
|
||||
int* Pointer = reinterpret_cast<int*>(&x[0]);
|
||||
Pointer[0] &= 0x7fffffff;
|
||||
@@ -214,17 +216,17 @@ namespace taylorCos
|
||||
return x;
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> fastCosNew(vecType<T, P> const & x)
|
||||
template <int D, typename T, glm::precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> fastCosNew(vecType<D, T, P> const & x)
|
||||
{
|
||||
vecType<T, P> const Angle0_PI(fastAbs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
vecType<D, T, P> const Angle0_PI(fastAbs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
return taylorSeriesNewCos6(x);
|
||||
/*
|
||||
vecType<bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<T, P>(glm::half_pi<T>())));
|
||||
vecType<D, bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<D, T, P>(glm::half_pi<T>())));
|
||||
|
||||
vecType<T, P> const RevertAngle(mix(vecType<T, P>(glm::pi<T>()), vecType<T, P>(0), FirstQuarterPi));
|
||||
vecType<T, P> const ReturnSign(mix(vecType<T, P>(-1), vecType<T, P>(1), FirstQuarterPi));
|
||||
vecType<T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
vecType<D, T, P> const RevertAngle(mix(vecType<D, T, P>(glm::pi<T>()), vecType<D, T, P>(0), FirstQuarterPi));
|
||||
vecType<D, T, P> const ReturnSign(mix(vecType<D, T, P>(-1), vecType<D, T, P>(1), FirstQuarterPi));
|
||||
vecType<D, T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
|
||||
return ReturnSign * taylorSeriesNewCos(SectionAngle);
|
||||
*/
|
||||
@@ -252,21 +254,21 @@ namespace taylorCos
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> deterministic_fmod(vecType<T, P> const & x, T y)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> deterministic_fmod(vecType<D, T, P> const & x, T y)
|
||||
{
|
||||
return x - y * trunc(x / y);
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> fastCosDeterminisctic(vecType<T, P> const & x)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> fastCosDeterminisctic(vecType<D, T, P> const & x)
|
||||
{
|
||||
vecType<T, P> const Angle0_PI(abs(deterministic_fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
vecType<bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<T, P>(glm::half_pi<T>())));
|
||||
vecType<D, T, P> const Angle0_PI(abs(deterministic_fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
vecType<D, bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<D, T, P>(glm::half_pi<T>())));
|
||||
|
||||
vecType<T, P> const RevertAngle(mix(vecType<T, P>(glm::pi<T>()), vecType<T, P>(0), FirstQuarterPi));
|
||||
vecType<T, P> const ReturnSign(mix(vecType<T, P>(-1), vecType<T, P>(1), FirstQuarterPi));
|
||||
vecType<T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
vecType<D, T, P> const RevertAngle(mix(vecType<D, T, P>(glm::pi<T>()), vecType<D, T, P>(0), FirstQuarterPi));
|
||||
vecType<D, T, P> const ReturnSign(mix(vecType<D, T, P>(-1), vecType<D, T, P>(1), FirstQuarterPi));
|
||||
vecType<D, T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
|
||||
return ReturnSign * taylorSeriesNewCos(SectionAngle);
|
||||
}
|
||||
@@ -293,8 +295,8 @@ namespace taylorCos
|
||||
return Error;
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> taylorSeriesRefCos(vecType<T, P> const & x)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> taylorSeriesRefCos(vecType<D, T, P> const & x)
|
||||
{
|
||||
return static_cast<T>(1)
|
||||
- (x * x) / glm::factorial(static_cast<T>(2))
|
||||
@@ -303,17 +305,17 @@ namespace taylorCos
|
||||
+ (x * x * x * x * x * x * x * x) / glm::factorial(static_cast<T>(8));
|
||||
}
|
||||
|
||||
template <typename T, glm::precision P, template <typename, glm::precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> fastRefCos(vecType<T, P> const & x)
|
||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<D, T, P> fastRefCos(vecType<D, T, P> const & x)
|
||||
{
|
||||
vecType<T, P> const Angle0_PI(glm::abs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
vecType<D, T, P> const Angle0_PI(glm::abs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>()));
|
||||
// return taylorSeriesRefCos(Angle0_PI);
|
||||
|
||||
vecType<bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<T, P>(glm::half_pi<T>())));
|
||||
vecType<D, bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<D, T, P>(glm::half_pi<T>())));
|
||||
|
||||
vecType<T, P> const RevertAngle(mix(vecType<T, P>(glm::pi<T>()), vecType<T, P>(0), FirstQuarterPi));
|
||||
vecType<T, P> const ReturnSign(mix(vecType<T, P>(-1), vecType<T, P>(1), FirstQuarterPi));
|
||||
vecType<T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
vecType<D, T, P> const RevertAngle(mix(vecType<D, T, P>(glm::pi<T>()), vecType<D, T, P>(0), FirstQuarterPi));
|
||||
vecType<D, T, P> const ReturnSign(mix(vecType<D, T, P>(-1), vecType<D, T, P>(1), FirstQuarterPi));
|
||||
vecType<D, T, P> const SectionAngle(RevertAngle - Angle0_PI);
|
||||
|
||||
return ReturnSign * taylorSeriesRefCos(SectionAngle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user