Merge pull request #1141 from troughton/inline-everything
MSL: Inline all non-entry-point functions
This commit is contained in:
commit
9b845a4788
@ -13,7 +13,7 @@ struct u0_counters
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct u0_counters
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct cb5_struct
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct cb
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -29,7 +29,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -38,7 +38,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -47,7 +47,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -56,7 +56,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -65,7 +65,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ struct main0_out
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -43,7 +43,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -52,7 +52,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -61,7 +61,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -70,7 +70,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -79,7 +79,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(2u, 1u, 1u);
|
||||
constant Data _25[2] = { Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } };
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -39,7 +39,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -48,7 +48,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -57,7 +57,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -66,7 +66,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -75,7 +75,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ struct SSBO1
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -25,7 +25,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -34,7 +34,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -43,7 +43,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -52,7 +52,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -61,7 +61,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
inline float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -68,7 +68,7 @@ float4x4 spvInverse4x4(float4x4 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 spvInverse3x3(float3x3 m)
|
||||
inline float3x3 spvInverse3x3(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -95,7 +95,7 @@ float3x3 spvInverse3x3(float3x3 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 spvInverse2x2(float2x2 m)
|
||||
inline float2x2 spvInverse2x2(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ struct SSBO2
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct main0_out
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -29,7 +29,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -38,7 +38,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -47,7 +47,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -56,7 +56,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -65,7 +65,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ struct main0_in
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -31,28 +31,28 @@ struct main0_in
|
||||
|
||||
// Implementation of the GLSL radians() function
|
||||
template<typename T>
|
||||
T radians(T d)
|
||||
inline T radians(T d)
|
||||
{
|
||||
return d * T(0.01745329251);
|
||||
}
|
||||
|
||||
// Implementation of the GLSL degrees() function
|
||||
template<typename T>
|
||||
T degrees(T r)
|
||||
inline T degrees(T r)
|
||||
{
|
||||
return r * T(57.2957795131);
|
||||
}
|
||||
|
||||
// Implementation of the GLSL findLSB() function
|
||||
template<typename T>
|
||||
T spvFindLSB(T x)
|
||||
inline T spvFindLSB(T x)
|
||||
{
|
||||
return select(ctz(x), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the signed GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindSMSB(T x)
|
||||
inline T spvFindSMSB(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
@ -72,7 +72,7 @@ inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
inline float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct main0_in
|
||||
|
||||
// Implementation of the GLSL sign() function for integer types
|
||||
template<typename T, typename E = typename enable_if<is_integral<T>::value>::type>
|
||||
T sign(T x)
|
||||
inline T sign(T x)
|
||||
{
|
||||
return select(select(select(x, T(0), x == T(0)), T(1), x > T(0)), T(-1), x < T(0));
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct main0_out
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -13,14 +13,14 @@ struct SSBO
|
||||
|
||||
// Implementation of the GLSL findLSB() function
|
||||
template<typename T>
|
||||
T spvFindLSB(T x)
|
||||
inline T spvFindLSB(T x)
|
||||
{
|
||||
return select(ctz(x), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the signed GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindSMSB(T x)
|
||||
inline T spvFindSMSB(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
@ -28,7 +28,7 @@ T spvFindSMSB(T x)
|
||||
|
||||
// Implementation of the unsigned GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindUMSB(T x)
|
||||
inline T spvFindUMSB(T x)
|
||||
{
|
||||
return select(clz(T(0)) - (clz(x) + T(1)), T(-1), x == T(0));
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct SSBO
|
||||
|
||||
// Implementation of the signed GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindSMSB(T x)
|
||||
inline T spvFindSMSB(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
@ -21,14 +21,14 @@ T spvFindSMSB(T x)
|
||||
|
||||
// Implementation of the unsigned GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindUMSB(T x)
|
||||
inline T spvFindUMSB(T x)
|
||||
{
|
||||
return select(clz(T(0)) - (clz(x) + T(1)), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the GLSL sign() function for integer types
|
||||
template<typename T, typename E = typename enable_if<is_integral<T>::value>::type>
|
||||
T sign(T x)
|
||||
inline T sign(T x)
|
||||
{
|
||||
return select(select(select(x, T(0), x == T(0)), T(1), x > T(0)), T(-1), x < T(0));
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ struct SSBORead
|
||||
float b;
|
||||
};
|
||||
|
||||
void copy_out(device float& A, device const float& B)
|
||||
inline void copy_out(device float& A, device const float& B)
|
||||
{
|
||||
A = B;
|
||||
}
|
||||
|
@ -22,17 +22,17 @@ struct baz
|
||||
int e[128];
|
||||
};
|
||||
|
||||
device int* select_buffer(device foo& buf, device baz& buf2, constant bar& cb)
|
||||
inline device int* select_buffer(device foo& buf, device baz& buf2, constant bar& cb)
|
||||
{
|
||||
return (cb.d != 0) ? &buf.a[0u] : &buf2.e[0u];
|
||||
}
|
||||
|
||||
device int* select_buffer_null(device foo& buf, constant bar& cb)
|
||||
inline device int* select_buffer_null(device foo& buf, constant bar& cb)
|
||||
{
|
||||
return (cb.d != 0) ? &buf.a[0u] : nullptr;
|
||||
}
|
||||
|
||||
threadgroup int* select_tgsm(constant bar& cb, threadgroup int (&tgsm)[128])
|
||||
inline threadgroup int* select_tgsm(constant bar& cb, threadgroup int (&tgsm)[128])
|
||||
{
|
||||
return (cb.d != 0) ? &tgsm[0u] : nullptr;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
using namespace metal;
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ using namespace metal;
|
||||
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(8u, 1u, 1u);
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -17,7 +17,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -26,7 +26,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -35,7 +35,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -44,7 +44,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -53,7 +53,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -7,14 +7,14 @@ using namespace metal;
|
||||
|
||||
// Implementation of the GLSL findLSB() function
|
||||
template<typename T>
|
||||
T spvFindLSB(T x)
|
||||
inline T spvFindLSB(T x)
|
||||
{
|
||||
return select(ctz(x), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the signed GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindSMSB(T x)
|
||||
inline T spvFindSMSB(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
@ -22,7 +22,7 @@ T spvFindSMSB(T x)
|
||||
|
||||
// Implementation of the unsigned GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindUMSB(T x)
|
||||
inline T spvFindUMSB(T x)
|
||||
{
|
||||
return select(clz(T(0)) - (clz(x) + T(1)), T(-1), x == T(0));
|
||||
}
|
||||
|
@ -26,28 +26,28 @@ struct ResType
|
||||
|
||||
// Implementation of the GLSL radians() function
|
||||
template<typename T>
|
||||
T radians(T d)
|
||||
inline T radians(T d)
|
||||
{
|
||||
return d * T(0.01745329251);
|
||||
}
|
||||
|
||||
// Implementation of the GLSL degrees() function
|
||||
template<typename T>
|
||||
T degrees(T r)
|
||||
inline T degrees(T r)
|
||||
{
|
||||
return r * T(57.2957795131);
|
||||
}
|
||||
|
||||
// Implementation of the GLSL findLSB() function
|
||||
template<typename T>
|
||||
T spvFindLSB(T x)
|
||||
inline T spvFindLSB(T x)
|
||||
{
|
||||
return select(ctz(x), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the signed GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindSMSB(T x)
|
||||
inline T spvFindSMSB(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
@ -55,14 +55,14 @@ T spvFindSMSB(T x)
|
||||
|
||||
// Implementation of the unsigned GLSL findMSB() function
|
||||
template<typename T>
|
||||
T spvFindUMSB(T x)
|
||||
inline T spvFindUMSB(T x)
|
||||
{
|
||||
return select(clz(T(0)) - (clz(x) + T(1)), T(-1), x == T(0));
|
||||
}
|
||||
|
||||
// Implementation of the GLSL sign() function for integer types
|
||||
template<typename T, typename E = typename enable_if<is_integral<T>::value>::type>
|
||||
T sign(T x)
|
||||
inline T sign(T x)
|
||||
{
|
||||
return select(select(select(x, T(0), x == T(0)), T(1), x > T(0)), T(-1), x < T(0));
|
||||
}
|
||||
@ -81,7 +81,7 @@ inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
inline float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -116,7 +116,7 @@ float4x4 spvInverse4x4(float4x4 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 spvInverse3x3(float3x3 m)
|
||||
inline float3x3 spvInverse3x3(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -143,7 +143,7 @@ float3x3 spvInverse3x3(float3x3 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 spvInverse2x2(float2x2 m)
|
||||
inline float2x2 spvInverse2x2(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
using namespace metal;
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
using namespace metal;
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
@ -131,7 +131,7 @@ inline vec<T, 4> spvGatherCompareSwizzle(sampler s, const thread Tex& t, Ts... p
|
||||
return t.gather_compare(s, spvForward<Ts>(params)...);
|
||||
}
|
||||
|
||||
float4 doSwizzle(thread texture1d<float> tex1d, thread const sampler tex1dSmplr, constant uint& tex1dSwzl, thread texture2d<float> tex2d, thread const sampler tex2dSmplr, constant uint& tex2dSwzl, thread texture3d<float> tex3d, thread const sampler tex3dSmplr, constant uint& tex3dSwzl, thread texturecube<float> texCube, thread const sampler texCubeSmplr, constant uint& texCubeSwzl, thread texture2d_array<float> tex2dArray, thread const sampler tex2dArraySmplr, constant uint& tex2dArraySwzl, thread texturecube_array<float> texCubeArray, thread const sampler texCubeArraySmplr, constant uint& texCubeArraySwzl, thread depth2d<float> depth2d, thread const sampler depth2dSmplr, constant uint& depth2dSwzl, thread depthcube<float> depthCube, thread const sampler depthCubeSmplr, constant uint& depthCubeSwzl, thread depth2d_array<float> depth2dArray, thread const sampler depth2dArraySmplr, constant uint& depth2dArraySwzl, thread depthcube_array<float> depthCubeArray, thread const sampler depthCubeArraySmplr, constant uint& depthCubeArraySwzl, thread texture2d<float> texBuffer)
|
||||
inline float4 doSwizzle(thread texture1d<float> tex1d, thread const sampler tex1dSmplr, constant uint& tex1dSwzl, thread texture2d<float> tex2d, thread const sampler tex2dSmplr, constant uint& tex2dSwzl, thread texture3d<float> tex3d, thread const sampler tex3dSmplr, constant uint& tex3dSwzl, thread texturecube<float> texCube, thread const sampler texCubeSmplr, constant uint& texCubeSwzl, thread texture2d_array<float> tex2dArray, thread const sampler tex2dArraySmplr, constant uint& tex2dArraySwzl, thread texturecube_array<float> texCubeArray, thread const sampler texCubeArraySmplr, constant uint& texCubeArraySwzl, thread depth2d<float> depth2d, thread const sampler depth2dSmplr, constant uint& depth2dSwzl, thread depthcube<float> depthCube, thread const sampler depthCubeSmplr, constant uint& depthCubeSwzl, thread depth2d_array<float> depth2dArray, thread const sampler depth2dArraySmplr, constant uint& depth2dArraySwzl, thread depthcube_array<float> depthCubeArray, thread const sampler depthCubeArraySmplr, constant uint& depthCubeArraySwzl, thread texture2d<float> texBuffer)
|
||||
{
|
||||
float4 c = spvTextureSwizzle(tex1d.sample(tex1dSmplr, 0.0), tex1dSwzl);
|
||||
c = spvTextureSwizzle(tex2d.sample(tex2dSmplr, float2(0.0)), tex2dSwzl);
|
||||
|
@ -6,7 +6,7 @@
|
||||
using namespace metal;
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
using namespace metal;
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -17,46 +17,46 @@ struct SSBORow
|
||||
float2x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,52 +17,52 @@ struct SSBORow
|
||||
float2x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x2 loaded = float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy);
|
||||
v_29.col_major1[0].xy = loaded[0];
|
||||
v_29.col_major1[1].xy = loaded[1];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x2 loaded = transpose(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy));
|
||||
v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]);
|
||||
v_41.row_major0[1].xy = float2(loaded[0][1], loaded[1][1]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0].xy = float2x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy)[0];
|
||||
v_29.col_major0[1].xy = float2x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy)[1];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float2(float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[0][0], float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[1][0]);
|
||||
v_41.row_major0[1].xy = float2(float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[0][1], float2x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy)[1][1]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].xy = float2(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[0][0], float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[1][0]);
|
||||
v_29.col_major0[1].xy = float2(float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[0][1], float2x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy)[1][1]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float2x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy)[0];
|
||||
v_41.row_major0[1].xy = float2x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy)[1];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,46 +17,46 @@ struct SSBORow
|
||||
float2x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -19,42 +19,42 @@ struct SSBORow
|
||||
float3x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x3 loaded = float2x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]));
|
||||
v_29.col_major1[0] = loaded[0];
|
||||
v_29.col_major1[1] = loaded[1];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0] = float2x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]))[0];
|
||||
v_29.col_major0[1] = float2x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]))[1];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(float2x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1])));
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0] = float3(v_41.row_major0[0][0], v_41.row_major0[1][0], v_41.row_major0[2][0]);
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1][0];
|
||||
@ -62,7 +62,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1][2];
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0][1u] = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0][1u];
|
||||
|
@ -17,13 +17,13 @@ struct SSBORow
|
||||
float3x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x3 loaded = transpose(float3x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy));
|
||||
v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]);
|
||||
@ -31,31 +31,31 @@ void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[2].xy = float2(loaded[0][2], loaded[1][2]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float2(v_29.col_major0[0][0], v_29.col_major0[1][0]);
|
||||
v_41.row_major0[1].xy = float2(v_29.col_major0[0][1], v_29.col_major0[1][1]);
|
||||
v_41.row_major0[2].xy = float2(v_29.col_major0[0][2], v_29.col_major0[1][2]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(float3x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy));
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[0];
|
||||
v_41.row_major0[1].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[1];
|
||||
v_41.row_major0[2].xy = float3x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy)[2];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -63,7 +63,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float3x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -57,7 +57,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,13 +17,13 @@ struct SSBORow
|
||||
float4x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x4 loaded = transpose(float4x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy, v_41.row_major0[3].xy));
|
||||
v_41.row_major0[0].xy = float2(loaded[0][0], loaded[1][0]);
|
||||
@ -32,12 +32,12 @@ void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[3].xy = float2(loaded[0][3], loaded[1][3]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float2(v_29.col_major0[0][0], v_29.col_major0[1][0]);
|
||||
v_41.row_major0[1].xy = float2(v_29.col_major0[0][1], v_29.col_major0[1][1]);
|
||||
@ -45,12 +45,12 @@ void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3].xy = float2(v_29.col_major0[0][3], v_29.col_major0[1][3]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(float4x2(v_41.row_major0[0].xy, v_41.row_major0[1].xy, v_41.row_major0[2].xy, v_41.row_major0[3].xy));
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[0];
|
||||
v_41.row_major0[1].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[1];
|
||||
@ -58,7 +58,7 @@ void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[3].xy = float4x2(v_41.row_major1[0].xy, v_41.row_major1[1].xy, v_41.row_major1[2].xy, v_41.row_major1[3].xy)[3];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -67,7 +67,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float2x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float2x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -19,49 +19,49 @@ struct SSBORow
|
||||
packed_rm_float3x2 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x2 loaded = transpose(float2x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1])));
|
||||
v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]);
|
||||
v_41.row_major0[1] = float3(loaded[0][1], loaded[1][1], loaded[2][1]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float3(v_29.col_major0[0][0], v_29.col_major0[1][0], v_29.col_major0[2][0]);
|
||||
v_41.row_major0[1] = float3(v_29.col_major0[0][1], v_29.col_major0[1][1], v_29.col_major0[2][1]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(float2x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1])));
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float2x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]))[0];
|
||||
v_41.row_major0[1] = float2x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]))[1];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,7 +17,7 @@ struct SSBORow
|
||||
float2x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x2 loaded = float3x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy);
|
||||
v_29.col_major1[0].xy = loaded[0];
|
||||
@ -25,44 +25,44 @@ void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major1[2].xy = loaded[2];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[0];
|
||||
v_29.col_major0[1].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[1];
|
||||
v_29.col_major0[2].xy = float3x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy)[2];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(float3x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy));
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].xy = float2(v_41.row_major0[0][0], v_41.row_major0[1][0]);
|
||||
v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_29.col_major0[2].xy = float2(v_41.row_major0[0][2], v_41.row_major0[1][2]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,46 +17,46 @@ struct SSBORow
|
||||
float2x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -20,7 +20,7 @@ struct SSBORow
|
||||
packed_rm_float3x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x3 loaded = float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]));
|
||||
v_29.col_major1[0] = loaded[0];
|
||||
@ -28,7 +28,7 @@ void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major1[2] = loaded[2];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x3 loaded = transpose(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2])));
|
||||
v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]);
|
||||
@ -36,35 +36,35 @@ void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[2] = float3(loaded[0][2], loaded[1][2], loaded[2][2]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[0];
|
||||
v_29.col_major0[1] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[1];
|
||||
v_29.col_major0[2] = float3x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]))[2];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][0], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][0], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][0]);
|
||||
v_41.row_major0[1] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][1], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][1], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][1]);
|
||||
v_41.row_major0[2] = float3(float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[0][2], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[1][2], float3x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]))[2][2]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][0], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][0], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][0]);
|
||||
v_29.col_major0[1] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][1], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][1], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][1]);
|
||||
v_29.col_major0[2] = float3(float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[0][2], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[1][2], float3x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]))[2][2]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[0];
|
||||
v_41.row_major0[1] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[1];
|
||||
v_41.row_major0[2] = float3x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]))[2];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1][0];
|
||||
@ -72,7 +72,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1][2];
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0][1u] = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0][1u];
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float3x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -57,7 +57,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float3x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -57,7 +57,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -19,13 +19,13 @@ struct SSBORow
|
||||
packed_rm_float3x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x4 loaded = transpose(float4x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]), float3(v_41.row_major0[3])));
|
||||
v_41.row_major0[0] = float3(loaded[0][0], loaded[1][0], loaded[2][0]);
|
||||
@ -34,12 +34,12 @@ void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[3] = float3(loaded[0][3], loaded[1][3], loaded[2][3]);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float3(v_29.col_major0[0][0], v_29.col_major0[1][0], v_29.col_major0[2][0]);
|
||||
v_41.row_major0[1] = float3(v_29.col_major0[0][1], v_29.col_major0[1][1], v_29.col_major0[2][1]);
|
||||
@ -47,12 +47,12 @@ void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3] = float3(v_29.col_major0[0][3], v_29.col_major0[1][3], v_29.col_major0[2][3]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(float4x3(float3(v_41.row_major0[0]), float3(v_41.row_major0[1]), float3(v_41.row_major0[2]), float3(v_41.row_major0[3])));
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0[0] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[0];
|
||||
v_41.row_major0[1] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[1];
|
||||
@ -60,7 +60,7 @@ void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
v_41.row_major0[3] = float4x3(float3(v_41.row_major1[0]), float3(v_41.row_major1[1]), float3(v_41.row_major1[2]), float3(v_41.row_major1[3]))[3];
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -69,7 +69,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x3 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float3x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float3x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,46 +17,46 @@ struct SSBORow
|
||||
float2x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,7 +17,7 @@ struct SSBORow
|
||||
float2x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x2 loaded = float4x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy, v_29.col_major0[3].xy);
|
||||
v_29.col_major1[0].xy = loaded[0];
|
||||
@ -26,13 +26,13 @@ void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major1[3].xy = loaded[3];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[0];
|
||||
v_29.col_major0[1].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[1];
|
||||
@ -40,12 +40,12 @@ void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major0[3].xy = float4x2(v_29.col_major1[0].xy, v_29.col_major1[1].xy, v_29.col_major1[2].xy, v_29.col_major1[3].xy)[3];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(float4x2(v_29.col_major0[0].xy, v_29.col_major0[1].xy, v_29.col_major0[2].xy, v_29.col_major0[3].xy));
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].xy = float2(v_41.row_major0[0][0], v_41.row_major0[1][0]);
|
||||
v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
@ -53,19 +53,19 @@ void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_29.col_major0[3].xy = float2(v_41.row_major0[0][3], v_41.row_major0[1][3]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1].xy = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,46 +17,46 @@ struct SSBORow
|
||||
float2x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x2 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x2 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float2(v_41.row_major0[0][1], v_41.row_major0[1][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
v_41.row_major0[1][1] = v_29.col_major0[1].y;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -19,7 +19,7 @@ struct SSBORow
|
||||
float3x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x3 loaded = float4x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]), float3(v_29.col_major0[3]));
|
||||
v_29.col_major1[0] = loaded[0];
|
||||
@ -28,13 +28,13 @@ void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major1[3] = loaded[3];
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0[0] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[0];
|
||||
v_29.col_major0[1] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[1];
|
||||
@ -42,12 +42,12 @@ void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
v_29.col_major0[3] = float4x3(float3(v_29.col_major1[0]), float3(v_29.col_major1[1]), float3(v_29.col_major1[2]), float3(v_29.col_major1[3]))[3];
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(float4x3(float3(v_29.col_major0[0]), float3(v_29.col_major0[1]), float3(v_29.col_major0[2]), float3(v_29.col_major0[3])));
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0] = float3(v_41.row_major0[0][0], v_41.row_major0[1][0], v_41.row_major0[2][0]);
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
@ -55,12 +55,12 @@ void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_29.col_major0[3] = float3(v_41.row_major0[0][3], v_41.row_major0[1][3], v_41.row_major0[2][3]);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1][0];
|
||||
@ -68,7 +68,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1][2];
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0][1u] = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0][1u];
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float3x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -57,7 +57,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float3x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x3 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x3 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float3(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -57,7 +57,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[2][1] = v_29.col_major0[1].z;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -17,39 +17,39 @@ struct SSBORow
|
||||
float4x4 row_major1;
|
||||
};
|
||||
|
||||
void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
inline void load_store_to_variable_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
float4x4 loaded = v_29.col_major0;
|
||||
v_29.col_major1 = loaded;
|
||||
}
|
||||
|
||||
void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
inline void load_store_to_variable_row_major(device SSBORow& v_41)
|
||||
{
|
||||
float4x4 loaded = transpose(v_41.row_major0);
|
||||
v_41.row_major0 = transpose(loaded);
|
||||
}
|
||||
|
||||
void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
inline void copy_col_major_to_col_major(device SSBOCol& v_29)
|
||||
{
|
||||
v_29.col_major0 = v_29.col_major1;
|
||||
}
|
||||
|
||||
void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_col_major_to_row_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = transpose(v_29.col_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_row_major_to_col_major(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0 = transpose(v_41.row_major0);
|
||||
}
|
||||
|
||||
void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
inline void copy_row_major_to_row_major(device SSBORow& v_41)
|
||||
{
|
||||
v_41.row_major0 = v_41.row_major1;
|
||||
}
|
||||
|
||||
void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[1] = float4(v_41.row_major0[0][1], v_41.row_major0[1][1], v_41.row_major0[2][1], v_41.row_major0[3][1]);
|
||||
v_41.row_major0[0][1] = v_29.col_major0[1].x;
|
||||
@ -58,7 +58,7 @@ void copy_columns(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
v_41.row_major0[3][1] = v_29.col_major0[1].w;
|
||||
}
|
||||
|
||||
void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
inline void copy_elements(device SSBOCol& v_29, device SSBORow& v_41)
|
||||
{
|
||||
v_29.col_major0[0].y = v_41.row_major0[1u][0];
|
||||
v_41.row_major0[1u][0] = v_29.col_major0[0].y;
|
||||
|
@ -37,12 +37,12 @@ struct main0_out
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
||||
attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v_227)
|
||||
inline attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v_227)
|
||||
{
|
||||
int attribute_flags = v_227.input_attributes[location].w;
|
||||
attr_desc result;
|
||||
@ -55,7 +55,7 @@ attr_desc fetch_desc(thread const int& location, constant VertexBuffer& v_227)
|
||||
return result;
|
||||
}
|
||||
|
||||
uint get_bits(thread const uint4& v, thread const int& swap)
|
||||
inline uint get_bits(thread const uint4& v, thread const int& swap)
|
||||
{
|
||||
if (swap != 0)
|
||||
{
|
||||
@ -64,7 +64,7 @@ uint get_bits(thread const uint4& v, thread const int& swap)
|
||||
return ((v.x | (v.y << uint(8))) | (v.z << uint(16))) | (v.w << uint(24));
|
||||
}
|
||||
|
||||
float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_id, thread const texture2d<uint> input_stream)
|
||||
inline float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_id, thread const texture2d<uint> input_stream)
|
||||
{
|
||||
float4 result = float4(0.0, 0.0, 0.0, 1.0);
|
||||
bool reverse_order = false;
|
||||
@ -132,7 +132,7 @@ float4 fetch_attr(thread const attr_desc& desc, thread const int& vertex_id, thr
|
||||
return _210;
|
||||
}
|
||||
|
||||
float4 read_location(thread const int& location, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d<uint> buff_in_2, thread texture2d<uint> buff_in_1)
|
||||
inline float4 read_location(thread const int& location, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d<uint> buff_in_2, thread texture2d<uint> buff_in_1)
|
||||
{
|
||||
int param = location;
|
||||
attr_desc desc = fetch_desc(param, v_227);
|
||||
@ -151,7 +151,7 @@ float4 read_location(thread const int& location, constant VertexBuffer& v_227, t
|
||||
}
|
||||
}
|
||||
|
||||
void vs_adjust(thread float4& dst_reg0, thread float4& dst_reg1, thread float4& dst_reg7, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d<uint> buff_in_2, thread texture2d<uint> buff_in_1, constant VertexConstantsBuffer& v_309)
|
||||
inline void vs_adjust(thread float4& dst_reg0, thread float4& dst_reg1, thread float4& dst_reg7, constant VertexBuffer& v_227, thread uint& gl_VertexIndex, thread texture2d<uint> buff_in_2, thread texture2d<uint> buff_in_1, constant VertexConstantsBuffer& v_309)
|
||||
{
|
||||
int param = 3;
|
||||
float4 in_diff_color = read_location(param, v_227, gl_VertexIndex, buff_in_2, buff_in_1);
|
||||
|
@ -19,7 +19,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -28,7 +28,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -37,7 +37,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -46,7 +46,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -55,7 +55,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -64,7 +64,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -72,7 +72,7 @@ void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgr
|
||||
}
|
||||
}
|
||||
|
||||
float4 consume_constant_arrays2(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2)
|
||||
inline float4 consume_constant_arrays2(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2)
|
||||
{
|
||||
float4 indexable[4];
|
||||
spvArrayCopyFromStackToStack1(indexable, positions);
|
||||
@ -81,7 +81,7 @@ float4 consume_constant_arrays2(thread const float4 (&positions)[4], thread cons
|
||||
return indexable[Index1] + indexable_1[Index2];
|
||||
}
|
||||
|
||||
float4 consume_constant_arrays(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2)
|
||||
inline float4 consume_constant_arrays(thread const float4 (&positions)[4], thread const float4 (&positions2)[4], thread int& Index1, thread int& Index2)
|
||||
{
|
||||
return consume_constant_arrays2(positions, positions2, Index1, Index2);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct main0_out
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
@ -136,7 +136,7 @@ inline vec<T, 4> spvGatherCompareSwizzle(sampler s, const thread Tex& t, Ts... p
|
||||
return t.gather_compare(s, spvForward<Ts>(params)...);
|
||||
}
|
||||
|
||||
float4 do_samples(thread const texture1d<float> t1, thread const sampler t1Smplr, constant uint& t1Swzl, thread const texture2d<float> t2, constant uint& t2Swzl, thread const texture3d<float> t3, thread const sampler t3Smplr, constant uint& t3Swzl, thread const texturecube<float> tc, constant uint& tcSwzl, thread const texture2d_array<float> t2a, thread const sampler t2aSmplr, constant uint& t2aSwzl, thread const texturecube_array<float> tca, thread const sampler tcaSmplr, constant uint& tcaSwzl, thread const texture2d<float> tb, thread const depth2d<float> d2, thread const sampler d2Smplr, constant uint& d2Swzl, thread const depthcube<float> dc, thread const sampler dcSmplr, constant uint& dcSwzl, thread const depth2d_array<float> d2a, constant uint& d2aSwzl, thread const depthcube_array<float> dca, thread const sampler dcaSmplr, constant uint& dcaSwzl, thread sampler defaultSampler, thread sampler shadowSampler)
|
||||
inline float4 do_samples(thread const texture1d<float> t1, thread const sampler t1Smplr, constant uint& t1Swzl, thread const texture2d<float> t2, constant uint& t2Swzl, thread const texture3d<float> t3, thread const sampler t3Smplr, constant uint& t3Swzl, thread const texturecube<float> tc, constant uint& tcSwzl, thread const texture2d_array<float> t2a, thread const sampler t2aSmplr, constant uint& t2aSwzl, thread const texturecube_array<float> tca, thread const sampler tcaSmplr, constant uint& tcaSwzl, thread const texture2d<float> tb, thread const depth2d<float> d2, thread const sampler d2Smplr, constant uint& d2Swzl, thread const depthcube<float> dc, thread const sampler dcSmplr, constant uint& dcSwzl, thread const depth2d_array<float> d2a, constant uint& d2aSwzl, thread const depthcube_array<float> dca, thread const sampler dcaSmplr, constant uint& dcaSwzl, thread sampler defaultSampler, thread sampler shadowSampler)
|
||||
{
|
||||
float4 c = spvTextureSwizzle(t1.sample(t1Smplr, 0.0), t1Swzl);
|
||||
c = spvTextureSwizzle(t2.sample(defaultSampler, float2(0.0)), t2Swzl);
|
||||
|
@ -13,7 +13,7 @@ struct u0_counters
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct u0_counters
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct cb5_struct
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ struct cb
|
||||
};
|
||||
|
||||
// Returns 2D texture coords corresponding to 1D texel buffer coords
|
||||
uint2 spvTexelBufferCoord(uint tc)
|
||||
inline uint2 spvTexelBufferCoord(uint tc)
|
||||
{
|
||||
return uint2(tc % 4096, tc / 4096);
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ struct ssbo
|
||||
uint _data[1];
|
||||
};
|
||||
|
||||
void Load(thread const uint& size, const device ssbo& ssbo_1)
|
||||
inline void Load(thread const uint& size, const device ssbo& ssbo_1)
|
||||
{
|
||||
int byteAddrTemp = int(size >> uint(2));
|
||||
uint4 data = uint4(ssbo_1._data[byteAddrTemp], ssbo_1._data[byteAddrTemp + 1], ssbo_1._data[byteAddrTemp + 2], ssbo_1._data[byteAddrTemp + 3]);
|
||||
}
|
||||
|
||||
void _main(thread const uint3& id, const device ssbo& ssbo_1)
|
||||
inline void _main(thread const uint3& id, const device ssbo& ssbo_1)
|
||||
{
|
||||
uint param = 4u;
|
||||
Load(param, ssbo_1);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
void _main(thread const uint3& id, thread texture2d<float, access::read_write> TargetTexture)
|
||||
inline void _main(thread const uint3& id, thread texture2d<float, access::read_write> TargetTexture)
|
||||
{
|
||||
float2 loaded = TargetTexture.read(uint2(id.xy)).xy;
|
||||
float2 storeTemp = loaded + float2(1.0);
|
||||
|
@ -10,7 +10,7 @@ struct bufA
|
||||
uint _data[1];
|
||||
};
|
||||
|
||||
void _main(device bufA& bufA_1, device bufA& bufB)
|
||||
inline void _main(device bufA& bufA_1, device bufA& bufB)
|
||||
{
|
||||
bufA_1._data[0] = 0u;
|
||||
bufB._data[0] = 0u;
|
||||
|
@ -17,12 +17,12 @@ struct bar
|
||||
int d;
|
||||
};
|
||||
|
||||
device foo* select_buffer(device foo& a, constant bar& cb)
|
||||
inline device foo* select_buffer(device foo& a, constant bar& cb)
|
||||
{
|
||||
return (cb.d != 0) ? &a : nullptr;
|
||||
}
|
||||
|
||||
thread uint3* select_input(thread uint3& gl_GlobalInvocationID, thread uint3& gl_LocalInvocationID, constant bar& cb)
|
||||
inline thread uint3* select_input(thread uint3& gl_GlobalInvocationID, thread uint3& gl_LocalInvocationID, constant bar& cb)
|
||||
{
|
||||
return (cb.d != 0) ? &gl_GlobalInvocationID : &gl_LocalInvocationID;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ struct bar
|
||||
int b;
|
||||
};
|
||||
|
||||
device int* _24(device foo& a, device bar& b, thread uint3& gl_GlobalInvocationID)
|
||||
inline device int* _24(device foo& a, device bar& b, thread uint3& gl_GlobalInvocationID)
|
||||
{
|
||||
return (gl_GlobalInvocationID.x != 0u) ? &a.a : &b.b;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ struct cb1_struct
|
||||
|
||||
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u, 16u, 1u);
|
||||
|
||||
int2 get_texcoord(thread const int2& base, thread const int2& index, thread uint3& gl_LocalInvocationID)
|
||||
inline int2 get_texcoord(thread const int2& base, thread const int2& index, thread uint3& gl_LocalInvocationID)
|
||||
{
|
||||
return (base * int3(gl_LocalInvocationID).xy) + index;
|
||||
}
|
||||
|
@ -10,12 +10,12 @@ struct EmptyStructTest
|
||||
int empty_struct_member;
|
||||
};
|
||||
|
||||
float GetValue(thread const EmptyStructTest& self)
|
||||
inline float GetValue(thread const EmptyStructTest& self)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
float GetValue_1(EmptyStructTest self)
|
||||
inline float GetValue_1(EmptyStructTest self)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ struct main0_out
|
||||
float4 _entryPointOutput [[color(0)]];
|
||||
};
|
||||
|
||||
float4 _main(thread const float4& pos, constant buf& v_11)
|
||||
inline float4 _main(thread const float4& pos, constant buf& v_11)
|
||||
{
|
||||
int _46 = int(pos.x) % 16;
|
||||
Foo foo;
|
||||
|
@ -10,22 +10,22 @@ struct main0_out
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
float4 foo(thread const float4& foo_1)
|
||||
inline float4 foo(thread const float4& foo_1)
|
||||
{
|
||||
return foo_1 + float4(1.0);
|
||||
}
|
||||
|
||||
float4 foo(thread const float3& foo_1)
|
||||
inline float4 foo(thread const float3& foo_1)
|
||||
{
|
||||
return foo_1.xyzz + float4(1.0);
|
||||
}
|
||||
|
||||
float4 foo_1(thread const float4& foo_2)
|
||||
inline float4 foo_1(thread const float4& foo_2)
|
||||
{
|
||||
return foo_2 + float4(2.0);
|
||||
}
|
||||
|
||||
float4 foo(thread const float2& foo_2)
|
||||
inline float4 foo(thread const float2& foo_2)
|
||||
{
|
||||
return foo_2.xyxy + float4(2.0);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
#line 6 "test.frag"
|
||||
void func(thread float& FragColor, thread float& vColor)
|
||||
inline void func(thread float& FragColor, thread float& vColor)
|
||||
{
|
||||
#line 8 "test.frag"
|
||||
FragColor = 1.0;
|
||||
|
@ -20,7 +20,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -29,7 +29,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -38,7 +38,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -47,7 +47,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -56,7 +56,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -65,7 +65,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ struct main0_out
|
||||
float FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
float add_value(float v, float w)
|
||||
inline float add_value(float v, float w)
|
||||
{
|
||||
return v + w;
|
||||
}
|
||||
|
@ -19,13 +19,13 @@ struct main0_out
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -34,7 +34,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -43,7 +43,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -52,7 +52,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -61,7 +61,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -70,7 +70,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -15,12 +15,12 @@ struct main0_in
|
||||
float3 vUV [[user(locn0)]];
|
||||
};
|
||||
|
||||
float sample_combined(thread float3& vUV, thread depth2d<float> uShadow, thread const sampler uShadowSmplr)
|
||||
inline float sample_combined(thread float3& vUV, thread depth2d<float> uShadow, thread const sampler uShadowSmplr)
|
||||
{
|
||||
return uShadow.sample_compare(uShadowSmplr, vUV.xy, vUV.z);
|
||||
}
|
||||
|
||||
float sample_separate(thread float3& vUV, thread depth2d<float> uTexture, thread sampler uSampler)
|
||||
inline float sample_separate(thread float3& vUV, thread depth2d<float> uTexture, thread sampler uSampler)
|
||||
{
|
||||
return uTexture.sample_compare(uSampler, vUV.xy, vUV.z);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ struct main0_in
|
||||
};
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -55,7 +55,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -64,7 +64,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -73,7 +73,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -82,7 +82,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -91,7 +91,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -99,7 +99,7 @@ void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgr
|
||||
}
|
||||
}
|
||||
|
||||
HSOut _hs_main(thread const VertexOutput (&p)[3], thread const uint& i)
|
||||
inline HSOut _hs_main(thread const VertexOutput (&p)[3], thread const uint& i)
|
||||
{
|
||||
HSOut _output;
|
||||
_output.pos = p[i].pos;
|
||||
@ -107,7 +107,7 @@ HSOut _hs_main(thread const VertexOutput (&p)[3], thread const uint& i)
|
||||
return _output;
|
||||
}
|
||||
|
||||
HSConstantOut PatchHS(thread const VertexOutput (&_patch)[3])
|
||||
inline HSConstantOut PatchHS(thread const VertexOutput (&_patch)[3])
|
||||
{
|
||||
HSConstantOut _output;
|
||||
_output.EdgeTess[0] = (float2(1.0) + _patch[0].uv).x;
|
||||
|
@ -39,7 +39,7 @@ struct main0_in
|
||||
float3 PosL [[attribute(0)]];
|
||||
};
|
||||
|
||||
V2F _VS(thread const float3& PosL, thread const uint& instanceID, const device gInstanceData& gInstanceData_1)
|
||||
inline V2F _VS(thread const float3& PosL, thread const uint& instanceID, const device gInstanceData& gInstanceData_1)
|
||||
{
|
||||
InstanceData instData;
|
||||
instData.MATRIX_MVP = transpose(gInstanceData_1._data[instanceID].MATRIX_MVP);
|
||||
|
@ -10,7 +10,7 @@ struct main0_out
|
||||
float4 gl_Position [[position, invariant]];
|
||||
};
|
||||
|
||||
float4 _main()
|
||||
inline float4 _main()
|
||||
{
|
||||
return float4(1.0);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ struct main0_out
|
||||
float4 gl_Position [[position]];
|
||||
};
|
||||
|
||||
float4 _main(thread const uint& vid, thread const uint& iid)
|
||||
inline float4 _main(thread const uint& vid, thread const uint& iid)
|
||||
{
|
||||
return float4(float(vid + iid));
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
void set_f(thread int& f)
|
||||
inline void set_f(thread int& f)
|
||||
{
|
||||
f = 40;
|
||||
}
|
||||
|
||||
void set_shared_u(threadgroup int& u)
|
||||
inline void set_shared_u(threadgroup int& u)
|
||||
{
|
||||
u = 50;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ struct SSBO1
|
||||
float bz[1];
|
||||
};
|
||||
|
||||
uint get_size(device SSBO& v_14, constant uint& v_14BufferSize, device SSBO1* (&ssbos)[2], constant uint* ssbosBufferSize)
|
||||
inline uint get_size(device SSBO& v_14, constant uint& v_14BufferSize, device SSBO1* (&ssbos)[2], constant uint* ssbosBufferSize)
|
||||
{
|
||||
return uint(int((v_14BufferSize - 16) / 16) + int((ssbosBufferSize[1] - 0) / 4));
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ struct spvDescriptorSetBuffer1
|
||||
constant uint* spvBufferSizeConstants [[id(2)]];
|
||||
};
|
||||
|
||||
uint get_size(device SSBO& v_16, constant uint& v_16BufferSize, device SSBO1* constant (&ssbos)[2], constant uint* ssbosBufferSize, device SSBO2& v_38, constant uint& v_38BufferSize, device SSBO3* (&ssbos2)[2], constant uint* ssbos2BufferSize)
|
||||
inline uint get_size(device SSBO& v_16, constant uint& v_16BufferSize, device SSBO1* constant (&ssbos)[2], constant uint* ssbosBufferSize, device SSBO2& v_38, constant uint& v_38BufferSize, device SSBO3* (&ssbos2)[2], constant uint* ssbos2BufferSize)
|
||||
{
|
||||
uint len = uint(int((v_16BufferSize - 16) / 16));
|
||||
len += uint(int((ssbosBufferSize[1] - 0) / 4));
|
||||
|
@ -7,57 +7,57 @@ using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(4u, 1u, 1u);
|
||||
|
||||
void barrier_shared()
|
||||
inline void barrier_shared()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
}
|
||||
|
||||
void full_barrier()
|
||||
inline void full_barrier()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void image_barrier()
|
||||
inline void image_barrier()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void buffer_barrier()
|
||||
inline void buffer_barrier()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device);
|
||||
}
|
||||
|
||||
void group_barrier()
|
||||
inline void group_barrier()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void barrier_shared_exec()
|
||||
inline void barrier_shared_exec()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
}
|
||||
|
||||
void full_barrier_exec()
|
||||
inline void full_barrier_exec()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void image_barrier_exec()
|
||||
inline void image_barrier_exec()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void buffer_barrier_exec()
|
||||
inline void buffer_barrier_exec()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device);
|
||||
}
|
||||
|
||||
void group_barrier_exec()
|
||||
inline void group_barrier_exec()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup | mem_flags::mem_texture);
|
||||
}
|
||||
|
||||
void exec_barrier()
|
||||
inline void exec_barrier()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
void out_test_0(thread const int& cond, thread int& i)
|
||||
inline void out_test_0(thread const int& cond, thread int& i)
|
||||
{
|
||||
if (cond == 0)
|
||||
{
|
||||
@ -17,7 +17,7 @@ void out_test_0(thread const int& cond, thread int& i)
|
||||
}
|
||||
}
|
||||
|
||||
void out_test_1(thread const int& cond, thread int& i)
|
||||
inline void out_test_1(thread const int& cond, thread int& i)
|
||||
{
|
||||
switch (cond)
|
||||
{
|
||||
@ -34,7 +34,7 @@ void out_test_1(thread const int& cond, thread int& i)
|
||||
}
|
||||
}
|
||||
|
||||
void inout_test_0(thread const int& cond, thread int& i)
|
||||
inline void inout_test_0(thread const int& cond, thread int& i)
|
||||
{
|
||||
if (cond == 0)
|
||||
{
|
||||
@ -42,7 +42,7 @@ void inout_test_0(thread const int& cond, thread int& i)
|
||||
}
|
||||
}
|
||||
|
||||
void inout_test_1(thread const int& cond, thread int& i)
|
||||
inline void inout_test_1(thread const int& cond, thread int& i)
|
||||
{
|
||||
switch (cond)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ struct SSBO
|
||||
|
||||
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(8u, 8u, 1u);
|
||||
|
||||
void Zero(thread Foo0& v)
|
||||
inline void Zero(thread Foo0& v)
|
||||
{
|
||||
v.a = 0.0;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(2u, 1u, 1u);
|
||||
constant Data _25[2] = { Data{ 1.0, 2.0 }, Data{ 3.0, 4.0 } };
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -39,7 +39,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -48,7 +48,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -57,7 +57,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -66,7 +66,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -75,7 +75,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -83,7 +83,7 @@ void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgr
|
||||
}
|
||||
}
|
||||
|
||||
Data combine(thread const Data& a, thread const Data& b)
|
||||
inline Data combine(thread const Data& a, thread const Data& b)
|
||||
{
|
||||
return Data{ a.a + b.a, a.b + b.b };
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ struct Composite
|
||||
constant float4 _43[2] = { float4(20.0), float4(40.0) };
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -33,7 +33,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -42,7 +42,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -51,7 +51,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -60,7 +60,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -69,7 +69,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ constant float _20[2][2] = { { 1.0, 2.0 }, { 3.0, 4.0 } };
|
||||
constant float _21[2][2][2] = { { { 1.0, 2.0 }, { 3.0, 4.0 } }, { { 1.0, 2.0 }, { 3.0, 4.0 } } };
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -27,7 +27,7 @@ void spvArrayCopyFromConstantToStack1(thread T (&dst)[A], constant T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -36,7 +36,7 @@ void spvArrayCopyFromConstantToThreadGroup1(threadgroup T (&dst)[A], constant T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -45,7 +45,7 @@ void spvArrayCopyFromStackToStack1(thread T (&dst)[A], thread const T (&src)[A])
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
inline void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -54,7 +54,7 @@ void spvArrayCopyFromStackToThreadGroup1(threadgroup T (&dst)[A], thread const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -63,7 +63,7 @@ void spvArrayCopyFromThreadGroupToStack1(thread T (&dst)[A], threadgroup const T
|
||||
}
|
||||
|
||||
template<typename T, uint A>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgroup const T (&src)[A])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -72,7 +72,7 @@ void spvArrayCopyFromThreadGroupToThreadGroup1(threadgroup T (&dst)[A], threadgr
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromConstantToStack2(thread T (&dst)[A][B], constant T (&src)[A][B])
|
||||
inline void spvArrayCopyFromConstantToStack2(thread T (&dst)[A][B], constant T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -81,7 +81,7 @@ void spvArrayCopyFromConstantToStack2(thread T (&dst)[A][B], constant T (&src)[A
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromConstantToThreadGroup2(threadgroup T (&dst)[A][B], constant T (&src)[A][B])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup2(threadgroup T (&dst)[A][B], constant T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -90,7 +90,7 @@ void spvArrayCopyFromConstantToThreadGroup2(threadgroup T (&dst)[A][B], constant
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromStackToStack2(thread T (&dst)[A][B], thread const T (&src)[A][B])
|
||||
inline void spvArrayCopyFromStackToStack2(thread T (&dst)[A][B], thread const T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -99,7 +99,7 @@ void spvArrayCopyFromStackToStack2(thread T (&dst)[A][B], thread const T (&src)[
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromStackToThreadGroup2(threadgroup T (&dst)[A][B], thread const T (&src)[A][B])
|
||||
inline void spvArrayCopyFromStackToThreadGroup2(threadgroup T (&dst)[A][B], thread const T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -108,7 +108,7 @@ void spvArrayCopyFromStackToThreadGroup2(threadgroup T (&dst)[A][B], thread cons
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromThreadGroupToStack2(thread T (&dst)[A][B], threadgroup const T (&src)[A][B])
|
||||
inline void spvArrayCopyFromThreadGroupToStack2(thread T (&dst)[A][B], threadgroup const T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -117,7 +117,7 @@ void spvArrayCopyFromThreadGroupToStack2(thread T (&dst)[A][B], threadgroup cons
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup2(threadgroup T (&dst)[A][B], threadgroup const T (&src)[A][B])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup2(threadgroup T (&dst)[A][B], threadgroup const T (&src)[A][B])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -126,7 +126,7 @@ void spvArrayCopyFromThreadGroupToThreadGroup2(threadgroup T (&dst)[A][B], threa
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromConstantToStack3(thread T (&dst)[A][B][C], constant T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromConstantToStack3(thread T (&dst)[A][B][C], constant T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -135,7 +135,7 @@ void spvArrayCopyFromConstantToStack3(thread T (&dst)[A][B][C], constant T (&src
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromConstantToThreadGroup3(threadgroup T (&dst)[A][B][C], constant T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromConstantToThreadGroup3(threadgroup T (&dst)[A][B][C], constant T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -144,7 +144,7 @@ void spvArrayCopyFromConstantToThreadGroup3(threadgroup T (&dst)[A][B][C], const
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromStackToStack3(thread T (&dst)[A][B][C], thread const T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromStackToStack3(thread T (&dst)[A][B][C], thread const T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -153,7 +153,7 @@ void spvArrayCopyFromStackToStack3(thread T (&dst)[A][B][C], thread const T (&sr
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromStackToThreadGroup3(threadgroup T (&dst)[A][B][C], thread const T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromStackToThreadGroup3(threadgroup T (&dst)[A][B][C], thread const T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -162,7 +162,7 @@ void spvArrayCopyFromStackToThreadGroup3(threadgroup T (&dst)[A][B][C], thread c
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromThreadGroupToStack3(thread T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromThreadGroupToStack3(thread T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
@ -171,7 +171,7 @@ void spvArrayCopyFromThreadGroupToStack3(thread T (&dst)[A][B][C], threadgroup c
|
||||
}
|
||||
|
||||
template<typename T, uint A, uint B, uint C>
|
||||
void spvArrayCopyFromThreadGroupToThreadGroup3(threadgroup T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C])
|
||||
inline void spvArrayCopyFromThreadGroupToThreadGroup3(threadgroup T (&dst)[A][B][C], threadgroup const T (&src)[A][B][C])
|
||||
{
|
||||
for (uint i = 0; i < A; i++)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
void myfunc(threadgroup int (&foo)[1337])
|
||||
inline void myfunc(threadgroup int (&foo)[1337])
|
||||
{
|
||||
foo[0] = 13;
|
||||
}
|
||||
|
@ -13,12 +13,12 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
float getB(device myBlock& myStorage, thread uint3& gl_GlobalInvocationID)
|
||||
inline float getB(device myBlock& myStorage, thread uint3& gl_GlobalInvocationID)
|
||||
{
|
||||
return myStorage.b[gl_GlobalInvocationID.x];
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ inline float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float4x4 spvInverse4x4(float4x4 m)
|
||||
inline float4x4 spvInverse4x4(float4x4 m)
|
||||
{
|
||||
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -68,7 +68,7 @@ float4x4 spvInverse4x4(float4x4 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float3x3 spvInverse3x3(float3x3 m)
|
||||
inline float3x3 spvInverse3x3(float3x3 m)
|
||||
{
|
||||
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
@ -95,7 +95,7 @@ float3x3 spvInverse3x3(float3x3 m)
|
||||
|
||||
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
|
||||
// adjoint and dividing by the determinant. The contents of the matrix are changed.
|
||||
float2x2 spvInverse2x2(float2x2 m)
|
||||
inline float2x2 spvInverse2x2(float2x2 m)
|
||||
{
|
||||
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
|
||||
|
||||
|
@ -13,7 +13,7 @@ struct myBlock
|
||||
|
||||
// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()
|
||||
template<typename Tx, typename Ty>
|
||||
Tx mod(Tx x, Ty y)
|
||||
inline Tx mod(Tx x, Ty y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user