Hi,
I have a strange crash with my code; I explain, when I do this have a crash :
Ray shadowRay;
... set up the shadow ray ...
Intersect(&shadowRay, &rayHit, scene);
When I do this , I have no crash :
Ray shadowRay;
... set up the shadow ray ...
Ray shadowRay2;
rayCopy(shadowRay2, shadowRay);
Intersect(&shadowRay2, &rayHit, scene);
Strange, no ?
I have test it under NVidia OpenCL and I have no problem, so I suspect a bug in the AMD SDK 😞
Hi Micah,
This crash occur during run-time on the CPU.
Hi Michah,
How can I have a buffer overrun on the CPU ?
To solve the problem, I just create a new variable, copy the data from the original one and use the new one !!!!
I do nothing else than creating a copy of the variable !
Also, I have no problem with the NVidia version !
How can I check this ?
Hi Micah,
Which buffer ? it is a local variable, not a buffer !
NB: or maybe I miss something ?
maybe something like this: rayCopy(&shadowRay2, shadowRay);
If ray is a variable, you have to send the pointer to it, so the function can change the value?
Maybe you have a residual value that doesn't represent a ray, so the intersection ands up somewhere where it is not allowed, following a pointer from the structure Ray, which isn't initialised, because the function Copy didn't change it's value.
[edit] sorry, I thought the second code gave the crash, not the first