cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dimz
Journeyman III

IntersectBatch results in "unhandled exception" (FireraysSDK, CPU)

/* API INITIALIZATION */

int cpuidx = -1;

for (int idx = 0; idx < IntersectionApi::GetIntersectionDeviceCount(); ++idx) {

     IntersectionDeviceInfo const& devinfo(IntersectionApi::GetIntersectionDeviceInfo(idx));

     if (devinfo.type == IntersectionDeviceInfo::kCpu && devinfo.apis & IntersectionDeviceInfo::kOpenCl) {

          gpuidx = idx;

     }

}

int apitype = IntersectionDeviceInfo::kOpenCl;

scene = IntersectionApi::Create(0, &cpuidx, &apitype, 1);


/* SETTING UP SCENE */

Shape *shape = scene->CreateMesh(&vertex[0].x, numVert, sizeof(vec4), &v->at(0), sizeof(int) * 3, nullptr, numTri/3);

scene->AttachShape(shape);
scene->Commit()

raysCPU = (ray*)malloc(sizeof(ray)*rayBufferRayCount);

hitsCPU = (Intersection*)malloc(sizeof(Intersection)*rayBufferRayCount);

m_Rays->getData(0, rayBufferRayCount * sizeof(ray), raysCPU);

scene->IntersectBatch(raysCPU, rayBufferRayCount, hitsCPU);

m_Hits->setData(rayBufferRayCount*sizeof(Intersection), hitsCPU);

Question:
The code above is the way i set up my device, my goal is run the IntersectionBatch() at CPU.
m_Rays() gets the rays from my openGl application and store them in a Ray vector.
m_Hits() sends the hits vector to my OpenGl application.
I followed all your instructions that you gave me at FireraysSDK web page, but the problem is the IntersectionBatch function is getting me "unhandled exception", can you help me with this?

Output Window:

Exception thrown at 0x00007FFE94171F08 in composerOptix64_d.exe: Microsoft C++ exception: FireRays::ExceptionImpl at memory location 0x000000000013CF58.

Exception thrown at 0x00007FFE94171F08 in composerOptix64_d.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Exception thrown at 0x00007FFE94171F08 in composerOptix64_d.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Exception thrown at 0x00007FFE94171F08 in composerOptix64_d.exe: Microsoft C++ exception: FireRays::ExceptionImpl at memory location 0x000000000013CF58.

0 Likes
1 Reply
dmitryk
Staff

Hi dimz,

I would suggest reporting the issues related to FireRays in its Github repository here: https://github.com/GPUOpen-LibrariesAndSDKs/FireRays_SDK

When reporting the issue there please make sure you include your hardware configuration, driver and OpenCL runtime version.

Note, that CPU execution codepath has only been tested with AMD OpenCL runtime (for both AMD and Intel CPUs), so the issue might be related to Intel OpenCL runtime if it is installed on your system. As a workaround I would suggest to install and use AMD OpenCL.

0 Likes