Hi everybody,
I’m currently facing a strange problem :
I define a perRayData structure and declare a variable :
struct PerRayData_test
{
float3 a;
float3 b;
};
rtDeclareVariable(PerRayData_test, prd_test, rtPayload, );
The following initialization in a any_hit_program makes my program crash:
prd_test.a = make_float3(0);
prd_test.b = make_float3(0);
with error :
OptiX Error: Unknown error (Details: Function “_rtContextLaunch2D” caught except
ion: Encountered a CUDA error: Kernel launch returned (999): Unknown, [6619200]).
After debugging instruction by instruction it seems that the second initialization causes the crash.
So I modify my structure in the following way :
struct PerRayData_test
{
float a1;
float a2;
float a3;
float b1;
float b2;
float b3;
};
and modify the lines :
prd_test.a1 = 0;
prd_test.a2 = 0;
prd_test.a3 = 0;
prd_test.b1 = 0;
prd_test.b2 = 0;
prd_test.b3 = 0;
The program crashes on the initialization of b3 with the same error…
But when I separate a and b in two different structures (each containing a float3), the program works oO !!
Please can you explain me this strange behaviour ?? Thanks.