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 cc5c7ce829 - Show all commits

View File

@ -448,20 +448,32 @@ template<typename T, int Dimensions, bool Array = false> struct ImageBase {
typename DataVec = typename T::data_vec_type, \ typename DataVec = typename T::data_vec_type, \
typename SizeVec = typename T::size_vec_type> typename SizeVec = typename T::size_vec_type>
IMG_TEMPLATE SizeVec imageSize(T) {} IMG_TEMPLATE SizeVec imageSize(const T &) {}
IMG_TEMPLATE DataVec imageLoad(T, IntCoord) {} IMG_TEMPLATE DataVec imageLoad(const T &, IntCoord) {}
IMG_TEMPLATE void imageStore(T, IntCoord, DataVec) {} IMG_TEMPLATE void imageStore(T &, IntCoord, DataVec) {}
IMG_TEMPLATE void imageFence(T) {} IMG_TEMPLATE void imageFence(T &) {}
/* Cannot write to a read only image. */
IMG_TEMPLATE void imageStore(const T &, IntCoord, DataVec) = delete;
IMG_TEMPLATE void imageFence(const T &) = delete;
#define imageLoadFast imageLoad #define imageLoadFast imageLoad
#define imageStoreFast imageStore #define imageStoreFast imageStore
IMG_TEMPLATE uint imageAtomicAdd(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicAdd(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicMin(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicMin(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicMax(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicMax(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicAnd(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicAnd(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicXor(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicXor(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicExchange(T, IntCoord, uint); IMG_TEMPLATE uint imageAtomicExchange(T &, IntCoord, uint) {}
IMG_TEMPLATE uint imageAtomicCompSwap(T, IntCoord, uint, uint); IMG_TEMPLATE uint imageAtomicCompSwap(T &, IntCoord, uint, uint) {}
/* Cannot write to a read only image. */
IMG_TEMPLATE uint imageAtomicAdd(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicMin(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicMax(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicAnd(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicXor(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicExchange(const T &, IntCoord, uint) = delete;
IMG_TEMPLATE uint imageAtomicCompSwap(const T &, IntCoord, uint, uint) = delete;
#undef IMG_TEMPLATE #undef IMG_TEMPLATE