Output information in shader

I try to print optixGetLaunchIndex in __raygen__ shader, e.g.

const uint3 idx = optixGetLaunchIndex();
printf("idx: %u %u %u\n", idx.x, idx.y, idx.z);

But when I run the program, there is no output about idx. I wonder if I cannot print anything in the shader?

Thanks in advance.

What’s your system configuration?
If you’re using R530 drivers, please try upgrading to the current R535 drivers for your system configuration.

There is an issue with CUDA printf inside OptiX kernels in R530 drivers, described in these threads with the workaround:
https://forums.developer.nvidia.com/t/printf-not-working-in-optix-kernel/246586/3
https://forums.developer.nvidia.com/t/debugging-is-broken-after-updating-to-cuda-12-1/245616

(There is a search bar in the top left of this forum site.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.