I am always getting an exception when using tex2DGrad. Generating the ptx file works just fine but when I am trying to execute the program it tells me the following:
OptiX Error: 'Parse error (Details: Function “RTresult _rtProgramCreateFromPTXFile(RTcontext, const char*, const char*, RTprogram_api**)” caught exception: […].ptx: error: Failed to translate PTX input to LLVM
Unexpected cast from: <2 x float> to: float
Unexpected cast from: <2 x float> to: float
I tried using the optix sample optixTextureSample and just replaced the following call:
result_buffer[launch_index] = tex2D(input_texture, uv.x, uv.y);
with this one (just for testing purposes):
result_buffer[launch_index] = tex2DGrad(input_texture, uv.x, uv.y, make_float2(0.0, 0.0), make_float2(0.0, 0.0));
and it results in the same exception.
Does anyone know whats the problem here? I need tex2DGrad to prevent texture aliasing in our raytracer.
I am using Optix 4.1.0 and Cuda 8.0.61_375.26 in OpenSUSE 13.2