Hi,
I am building an Algorithm, which is suposed to run on both, the cpu and the gpu. It would be really usefull if I could just use my enum in the shaders header file and could just include it in both, my cpp and the hlsl shader itself (enum determines which function is going to be executed). But Unluckily I always get the error X3000 unexspected token when i try to use enums in my shader.
On the internet I read that enum is a reserved keyword for HLSL though I found very few examples of HLSL Code using enums, it should be possible or am I wrong?
Not even this hlsl file compiles:
enum { test1, test2};
[numthreads(8, 1, 1)]
void CS_NEW( uint ID : SV_DispatchThreadID )
{
}
I am using the Inbuild HLSL Compiler from Visual Studio 2012, am I the only one having this Issue?