Found some error codes without documentation: 1003, 3072

When trying to enable RTX via rtGlobalSetAttribute I get a return code of 3072, but since there is no context I can’t rtContextGetErrorString (and there isn’t function without context that I have seen).

And when launching I get 1003 in my exception program. This only seems to affect a few origins and I have a vague idea what might be missing, but it would help to know how this error is caused on the Optix side.

Hi @tjaenichen,

Error code 3072 from rtGlobalSetAttribute is hex code 0xC00, which you can see in internal/optix_declarations.h:

RT_ERROR_INVALID_GLOBAL_ATTRIBUTE = 0xC00, /*!< Invalid global attribute     */

Looking at the implementation, I don’t see how it’s possible to get RT_ERROR_INVALID_GLOBAL_ATTRIBUTE unless the parameter is in the wrong place or something. Here’s what one of our samples does to set this attribute:

int executionStrategy = 1;
rtGlobalSetAttribute(RT_GLOBAL_ATTRIBUTE_ENABLE_RTX, sizeof(int), &executionStrategy);

As to what might be wrong, I’m not sure. Is it possible the machines don’t have any visible CUDA devices or something like that? RTX doesn’t work on GPUs earlier than Maxwell. I’m interested to hear what you figure out!


Error code 1003 is 0x3EB which is
RT_EXCEPTION_PAYLOAD_ACCESS_OUT_OF_BOUNDS = 0x3EB, /*!< Payload access out of bounds - Added in OptiX 6.0 */

RT_EXCEPTION_PAYLOAD_ACCESS_OUT_OF_BOUNDS verifies that accesses to the ray payload are
within valid bounds. This exception is only supported with the RTX execution strategy.

Please check all your rtPayload variable accesses for any chance of an out of bounds condition.

Thanks to both of you! So if I understand this correctly, if I get both of these messages it means that even though I get the 3072 RTX is still enabled? (I am running on a 2080, btw)

I’ll double check the rtPayloads!

Oh yes, what is the actual value of RT_GLOBAL_ATTRIBUTE_ENABLE_RTX?

You do not need to enable the RTX execution strategy. It’s the default on all drivers supporting OptiX 6.0.0.
It was not when starting with that implementation internally and that’s where the confusion in the old OptiX programming guide came from.

For example the OptiX SDK example optixGeometryTriangles requires the RTX execution strategy because it’s using GeometryTriangles nodes and does not call rtGlobalSetAttribute at all.

Please do a “Find in Files” on the OptiX SDK headers and sources for such questions.
You’ll find it in OptiX SDK 6.0.0\include\internal\optix_declarations.h

Excellent, makes a lot of sense.

And thanks for the pointer to the header file. I did search for it but must have missed it.