Hi,
I am getting the following error after compiling the optix code. Its coming from rtTrace() function call because after commenting it out, the compilation succeeds. Please help if I am missing something obvious.
I am using Optix3.6.2, CUDA 6.0.
ptxas : fatal error : Ptx assembly aborted due to errors
Code:
#include “Helper.cuh”
#include <optix.h>
#include <optix_world.h>
// Payload for ray type 0: visible rays
struct RadiancePL
{
float3 color;
int recursion_depth;
//int primID;
};
// Payload for ray type 1: shadow rays
struct ShadowPL
{
//int recursion_depth;
float attenuation;
};
// Optix semantic variables
rtDeclareVariable(uint2, launch_index, rtLaunchIndex, “GPU thread index”);
rtDeclareVariable(optix::Ray, cur_Ray, rtCurrentRay, “Ray in execution”);
rtDeclareVariable(ShadowPL, shadow_PL, rtPayload, “Shadow Ray Payload”);
rtDeclareVariable(RadiancePL, radiance_PL, rtPayload, “Radiance Ray Payload”);
rtDeclareVariable(float, intersect_dist, rtIntersectionDistance, “Parametric intersection distance”);
// Host variables
rtDeclareVariable(rtObject, top_object, , “Root node where Ray-Tracing context is launched”);
rtDeclareVariable(erVertex, cam_source, , “Camera source”);
rtDeclareVariable(erVertex, cam_target, , “Camera target”);
rtDeclareVariable(float, cam_fovX, , “Camera Horizontal Field of View”);
rtDeclareVariable(float, cam_fovY, , “Camera Vertical Field of View”);
rtDeclareVariable(float3, cam_up, , “Camera up”);
rtDeclareVariable(int2, img_dim, , “Image Dimensions”);
RT_PROGRAM void RayGen_Radiance()
{
RadiancePL payload;
payload.color = make_float3(0.0f);
payload.recursion_depth = 0; // initialize recursion depth
// Create ray
optix::Ray ray = /*creating code*/;
// Trace ray
rtTrace(top_object, ray, payload);
// Write result to output buffer
//writeOutput( payload.color );
}