GPU: GLSL-C++ compilation stubs #4

Closed
Clément Foucault wants to merge 38 commits from glsl-cpp-stubs-2 into glsl-include

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 9f191c31f5 - Show all commits

View File

@ -599,10 +599,12 @@ uint floatBitsToUint(double) RET;
double intBitsToFloat(int) RET; double intBitsToFloat(int) RET;
double uintBitsToFloat(uint) RET; double uintBitsToFloat(uint) RET;
namespace gl_FragmentShader {
/* Derivative functions. */ /* Derivative functions. */
template<typename T> T dFdx(T) RET; template<typename T> T dFdx(T) RET;
template<typename T> T dFdy(T) RET; template<typename T> T dFdy(T) RET;
template<typename T> T fwidth(T) RET; template<typename T> T fwidth(T) RET;
} // namespace gl_FragmentShader
/* Geometric functions. */ /* Geometric functions. */
template<typename T, int D> float faceforward(VecBase<T, D>, VecBase<T, D>, VecBase<T, D>) RET; template<typename T, int D> float faceforward(VecBase<T, D>, VecBase<T, D>, VecBase<T, D>) RET;
@ -713,6 +715,15 @@ const uint gl_LocalInvocationIndex;
/* Discards the output of the current fragment shader invocation and halts its execution. */ /* Discards the output of the current fragment shader invocation and halts its execution. */
# define discard # define discard
namespace gl_ComputeShader {
void barrier() {}
void memoryBarrier() {}
void memoryBarrierShared() {}
void memoryBarrierImage() {}
void memoryBarrierBuffer() {}
void groupMemoryBarrier() {}
} // namespace gl_ComputeShader
/** \} */ /** \} */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */