15a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#include "rs_core.rsh"
25a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#include "rs_structs.h"
35a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
45a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines/* Function declarations from libRS */
55a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern float4 __attribute__((overloadable)) convert_float4(uchar4 c);
65a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
75a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines/* Implementation of Core Runtime */
85a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
95a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern float4 rsUnpackColor8888(uchar4 c)
105a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines{
115a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return convert_float4(c) * 0.003921569f;
125a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
135a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
145a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
153ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern float __attribute__((overloadable)) rsClamp(float v, float l, float h) {
163ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
173ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
183ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern char __attribute__((overloadable)) rsClamp(char v, char l, char h) {
193ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
203ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
213ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern uchar __attribute__((overloadable)) rsClamp(uchar v, uchar l, uchar h) {
223ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
233ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
243ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern short __attribute__((overloadable)) rsClamp(short v, short l, short h) {
253ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
263ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
273ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern ushort __attribute__((overloadable)) rsClamp(ushort v, ushort l, ushort h) {
283ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
293ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
303ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern int __attribute__((overloadable)) rsClamp(int v, int l, int h) {
313ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
323ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
333ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Samsextern uint __attribute__((overloadable)) rsClamp(uint v, uint l, uint h) {
343ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams    return clamp(v, l, h);
353ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams}
363ff0fe77fdba8ad4a920dc27157d8c1786bb3661Jason Sams
375a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicCas(volatile int32_t *ptr, int32_t expectedValue, int32_t newValue) {
385a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_val_compare_and_swap(ptr, expectedValue, newValue);
395a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
405a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
415a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern uint32_t __attribute__((overloadable)) rsAtomicCas(volatile uint32_t *ptr, uint32_t expectedValue, uint32_t newValue) {
428e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_val_compare_and_swap(ptr, expectedValue, newValue);
435a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
445a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
455a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicInc(volatile int32_t *ptr) {
465a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_add(ptr, 1);
475a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
485a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
498e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicInc(volatile uint32_t *ptr) {
508e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_add(ptr, 1);
518e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
528e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
535a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicDec(volatile int32_t *ptr) {
545a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_sub(ptr, 1);
555a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
565a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
578e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicDec(volatile uint32_t *ptr) {
588e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_sub(ptr, 1);
598e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
608e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
615a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicAdd(volatile int32_t *ptr, int32_t value) {
625a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_add(ptr, value);
635a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
645a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
658e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicAdd(volatile uint32_t *ptr, uint32_t value) {
668e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_add(ptr, value);
678e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
688e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
695a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicSub(volatile int32_t *ptr, int32_t value) {
705a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_sub(ptr, value);
715a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
725a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
738e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicSub(volatile uint32_t *ptr, uint32_t value) {
748e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_sub(ptr, value);
758e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
768e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
775a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicAnd(volatile int32_t *ptr, int32_t value) {
785a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_and(ptr, value);
795a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
805a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
818e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicAnd(volatile uint32_t *ptr, uint32_t value) {
828e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_and(ptr, value);
838e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
848e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
855a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicOr(volatile int32_t *ptr, int32_t value) {
865a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_or(ptr, value);
875a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
885a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
898e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicOr(volatile uint32_t *ptr, uint32_t value) {
908e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_or(ptr, value);
918e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
928e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
935a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicXor(volatile int32_t *ptr, int32_t value) {
945a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return __sync_fetch_and_xor(ptr, value);
955a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
965a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
978e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Samsextern int32_t __attribute__((overloadable)) rsAtomicXor(volatile uint32_t *ptr, uint32_t value) {
988e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams    return __sync_fetch_and_xor(ptr, value);
998e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams}
1008e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams
1015a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern uint32_t __attribute__((overloadable)) min(uint32_t, uint32_t);
1025a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) min(int32_t, int32_t);
1035a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern uint32_t __attribute__((overloadable)) max(uint32_t, uint32_t);
1045a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) max(int32_t, int32_t);
1055a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1065a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern uint32_t __attribute__((overloadable)) rsAtomicMin(volatile uint32_t *ptr, uint32_t value) {
1075a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    uint32_t prev, status;
1085a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    do {
1095a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        prev = *ptr;
1105a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        uint32_t n = min(value, prev);
1118e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams        status = __sync_val_compare_and_swap(ptr, prev, n);
1125a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    } while (status != prev);
1135a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return prev;
1145a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1155a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1165a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicMin(volatile int32_t *ptr, int32_t value) {
1175a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    int32_t prev, status;
1185a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    do {
1195a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        prev = *ptr;
1205a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        int32_t n = min(value, prev);
1218e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams        status = __sync_val_compare_and_swap(ptr, prev, n);
1225a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    } while (status != prev);
1235a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return prev;
1245a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1255a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1265a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern uint32_t __attribute__((overloadable)) rsAtomicMax(volatile uint32_t *ptr, uint32_t value) {
1275a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    uint32_t prev, status;
1285a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    do {
1295a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        prev = *ptr;
1305a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        uint32_t n = max(value, prev);
1318e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams        status = __sync_val_compare_and_swap(ptr, prev, n);
1325a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    } while (status != prev);
1335a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return prev;
1345a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1355a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1365a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t __attribute__((overloadable)) rsAtomicMax(volatile int32_t *ptr, int32_t value) {
1375a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    int32_t prev, status;
1385a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    do {
1395a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        prev = *ptr;
1405a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines        int32_t n = max(value, prev);
1418e1f8dce2a9c36a0b9bb0dca278beabc3716e088Jason Sams        status = __sync_val_compare_and_swap(ptr, prev, n);
1425a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    } while (status != prev);
1435a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return prev;
1445a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1455a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1465a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1475a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1485a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int32_t rand();
1495a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#define RAND_MAX 0x7fffffff
1505a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1515a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1525a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1535a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern float __attribute__((overloadable)) rsRand(float min, float max);/* {
1545a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    float r = (float)rand();
1555a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    r /= RAND_MAX;
1565a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    r = r * (max - min) + min;
1575a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return r;
1585a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1595a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines*/
1605a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1615a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern float __attribute__((overloadable)) rsRand(float max) {
1625a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return rsRand(0.f, max);
1635a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    //float r = (float)rand();
1645a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    //r *= max;
1655a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    //r /= RAND_MAX;
1665a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    //return r;
1675a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1685a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1695a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int __attribute__((overloadable)) rsRand(int max) {
1705a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return (int)rsRand((float)max);
1715a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1725a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1735a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern int __attribute__((overloadable)) rsRand(int min, int max) {
1745a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    return (int)rsRand((float)min, (float)max);
1755a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1765a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1775a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#define PRIM_DEBUG(T)                               \
1785a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesextern void __attribute__((overloadable)) rsDebug(const char *, const T *);     \
1795a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hinesvoid __attribute__((overloadable)) rsDebug(const char *txt, T val) {            \
1805a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines    rsDebug(txt, &val);                                                         \
1815a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines}
1825a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
1835a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(char2)
1845a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(char3)
1855a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(char4)
1865a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uchar2)
1875a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uchar3)
1885a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uchar4)
1895a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(short2)
1905a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(short3)
1915a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(short4)
1925a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ushort2)
1935a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ushort3)
1945a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ushort4)
1955a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(int2)
1965a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(int3)
1975a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(int4)
1985a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uint2)
1995a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uint3)
2005a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(uint4)
2015a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(long2)
2025a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(long3)
2035a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(long4)
2045a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ulong2)
2055a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ulong3)
2065a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(ulong4)
2075a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(float2)
2085a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(float3)
2095a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(float4)
2105a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(double2)
2115a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(double3)
2125a47020542c52af3e879c1cd67674ca979ff0a18Stephen HinesPRIM_DEBUG(double4)
2135a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
2145a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines#undef PRIM_DEBUG
2155a47020542c52af3e879c1cd67674ca979ff0a18Stephen Hines
216