Problem with turning off RTX mode on GTX 1050 TI on newer drivers

Hello,

I ll just start off by saying I don’t really have Optix experience, other than upgrading our application from Optix 3.9 to Optix 6.5 ( with Cuda 10.2 ).

Our application uses Selector Nodes, which I know are not supported in RTX mode, thus we have the following code before creating a context.

const int RTX = false;
auto status = rtGlobalSetAttribute( RT_GLOBAL_ATTRIBUTE_ENABLE_RTX, sizeof( RTX ), &RTX );

This has worked well, untill I decently updated to the latest drivers ( 511.79 installed from NVIDIA Geforce Experience ) in which whis function returns RT_ERROR_INVALID_VALUE.
And the app doesn’t work ( because it uses Selector Nodes in RTX mode )

Works fine with Game Ready Driver 472.12
Works fine with Studio Driver 472.84

Not working with Game Ready Driver 497.29

Right, that is to be expected because the support for the mega-kernel execution mode has been removed from display drivers R495 and newer.

In absence of a better place, it has been mentioned inside the OptiX 7.4.0 SDK Release Notes which requires R495 or newer drivers:

Note: For OptiX 6 applications

  • Setting RT_GLOBAL_ATTRIBUTE_ENABLE_RTX to 0 via rtGlobalSetAttribute will result in an error as RTX is now the only supported mode for OptiX 6. The legacy megakernel execution strategy is no longer supported.

Unfortunately that means if you’re continuing to use the legacy megakernel execution mode for the Selector nodes which have been deprecated with OptiX 6.0.0 in 2018, you’re limited to the R470 drivers.

There are some use cases for Selectors which can be handled with the newer OptiX 7 API more efficiently, but not all cases are possible.
Maybe describe your usage of Selectors to see if that could be handled differently.

This is disappointing, to say the least.

Nvidia breaking compatibility was the reason we had to upgrade from Optix 3.9.1 to Optix 6.5in the first place - it stopped working with newer drivers.

We cannot continue upgrading our application every time.
This is a really small subset of the functionality of our applications and we don’t really have any developers that know OptiX.

I am in charge of this since I was the one who upgraded it, but I really don’t understand it.

I did look for some courses to learn OptiX, but only found OptiX 7.

It seems to me that upgrading it to Optix 7 is a big task since it’s a legacy code strongly coupled with the application.

How would you advise us to approach this issue?

Welcome @ilyasher89!

Sorry you got stuck maintaining this dependency on accident. Since the problem is with trying to install new drivers that lack support, the best short term advice is to stay on a 470 branch driver, and advise any of your users/customers that need the OptiX-related features to do the same.

Longer term, there are a few options. The next easiest option would be to deprecate your application feature that depends on selectors, in order to make the minimum code change that would allow you to use RTX. (I say this with absolutely zero knowledge of your app, so I’m fully aware I may say things that are not possible or even sound ridiculous to you. Apologies in advance if this is the case.)

Depending on how your application is using Selectors, you may be able to use OptiX 6.5 features and replace their use with either visibility masks, or with an any-hit program. This would require learning enough about OptiX 6.5 to update this feature, we are here to help if you want to go down that road. It probably wouldn’t be too hard, just be aware that OptiX 6.5 is already several years old and in maintenance mode, so keep in mind that spending effort here might not last as long as you would hope.

The best long-term option is to upgrade to OptiX 7, or to DirectX or Vulkan, but you’re absolutely right, any of these options could be a big task, and so it’s worth considering how important your ray tracing engine is to your application, and what the alternatives are. Since the DX and VK ray tracing extensions weren’t available back in the OptiX 3.9.1 days over six years ago, those are new options to investigate, and those APIs might give you better long term support options (even though we fully expect OptiX 7 to work another 6 years from now). Aside from feature continuity in your application, the main reasons to use OptiX are: it’s cross platform (Windows-Linux), comes with a high-end feature-rich denoiser, has tight CUDA integration, and has geometry primitives (e.g. curves) and features (e.g. motion blur, multi-level instancing) that aren’t available in DX/VK. There are some technical reasons as well, but the reason I’m saying this isn’t to convince to you upgrade to OptiX, it’s to help make an informed choice. If those reasons I listed aren’t things you need, that may make choosing Vulkan or DirectX easier. I probably don’t need to mention that using software ray tracing or disabling ray tracing features are other, possibly less good but perhaps viable options.

If the OptiX code is deeply entwined in your application, and you want to explore upgrading OptiX, we are happy to discuss learning resources, architectural ideas, and technical issues, either here publicly, or privately/confidentially if you’d like.


David.

Hello @dhart,

In terms of a short-term solution - it’s what we’re doing now, but since there are several thousand client applications - it’s a very temporary solution. Many of the clients would just allow auto-update.

Now for the long-term solution:
To be absolutely clear all the OptiX code is in a separate DLL ( It’s a Windows-only application ).
However that DLL depends on a lot of common/legacy code. As well as inside the DLL there doesn’t seem to be a clear separation between the OptiX and non-OptiX code.

There are essentially 4 or 5 calculations/scenes ( not sure how to describe them better ) done in OptiX.
I think that there is only one of them uses selector nodes - others seem to work with RTX.
That being said - I don’t know anything about the performance difference with and without RTX.

But I agree that whether we want to keep the current version or update to OptiX 7.X in the future - we need to get rid of Selector Nodes.

The second step would probably be internal separation and abstraction of OptiX code.

I would appreciate all the help I can get, but I would rather it be done privately.

Also, I would also like to go thru some learning material ( I would start with OptiX 6.X ). Something other than Developer Guide. Perhaps there are some video tutorials?

The OptiX Programming Guide must always be your first reference when trying to learn OptiX, but there are many additional resources.

NVIDIA raytracing documentation hub: https://raytracing-docs.nvidia.com/
Please always refer to the online documentation which are more up-to-date than the documents shipping with the SDK releases.

For the old OptiX API, there is my OptiX Introduction GTC presentation video at the bottom of this page: https://developer.nvidia.com/rtx/ray-tracing/optix
Slides are here: https://on-demand.gputechconf.com/gtc/2018/presentation/s8518-an-introduction-to-optix.pdf
(This will also be found via the GTC on-demand link further down.)
The example source code can be found here: https://github.com/nvpro-samples/optix_advanced_samples
Related sticky post on this forum: https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410

Note that this was using OptiX 5.1 at that time, so it’s not touching on the built-in triangle primitives which were added in OptiX 6.0 to be able to make use of the hardware accelerated triangle-intersection on RTX boards.
I made the examples compile with OptiX 6.5.0 as well, but depending on the MSVS used, you might need to set the CUDA_HOST_COMPILER location manually. MSVS 2017 and newer changed the compiler location.
https://github.com/nvpro-samples/optix_advanced_samples/issues/17
Look at the other issues in that repository first if you have issues building the examples.

While the first four introduction examples there are pretty basic, the later ones implement a full global illumination path tracer with a very flexible renderer architecture which is not showing the maximum possible performance in favor of elegant code.

I ported some of the later introduction samples to OptiX 7 here: https://github.com/NVIDIA/OptiX_Apps and added some even more advanced examples showing multi-GPU distribution and resource sharing via NVLINK. (Also explained inside the sticky post link above.)

I did not port the simpler examples because there is also an OptiX 7 SIGGRAPH Course which showed the more basic steps, similar to what some of the OptiX SDK samples show. https://github.com/ingowald/optix7course

All linked in this post as well: https://forums.developer.nvidia.com/t/optix-7-2-release/156619

There are also a lot of other interesting OptiX GTC presentations, esp. the ones from David about the new features in each OptiX 7 release, but there are also older ones including my OptiX introduction from 2018.
Just search for OptiX here: https://www.nvidia.com/en-us/on-demand/

If you have any question about OptiX, please check the resp. Programming Guide and API References first, then search this OptiX forum for related topics. Many things are already answered here.

Thank you, @droettger, it’s really helpful.

I think I’ll start learning, but in parallel, I think, I should start trying to replace Selector Nodes in our program.

I don’t really know how it’s used, I just know which scene uses it.

As I mentioned, I would prefer this to be private, so I could better explain the application ( and maybe even share some code - I don’t know yet ).
How do we proceed?

Thanks

The first thing you would need to determine is for what the Selectors are used inside your code base.
The easiest way would be to look at the Selector nodes’ Visit programs to see what they do.

If they are used to dynamically change the ray traversal through the acceleration structure per ray, like for a level of detail geometry approach depending on some distance, etc., then there is no way to port that directly over to the OptiX 6.5.0 default RTX execution strategy or OptiX 7 and greater algorithmic changes would need to be discussed based on your use case.

But if the selectors are used to switch scene elements for all rays, like in a configurator to select different wheels on a car (radio button behavior), or enabling different objects in a CAD model (DIP switch behavior), that would all be solvable by changing the top-level instance acceleration structure to contain the respective objects and rebuilding them which is rather quick. One could also have multiple of these top-level acceleration structures if the switching is among a static number of scene options.

For confidential communication there are either the private messages on this forum, which require users to have reached some trust level to become available. If you click on another forum user’s avatar image and the pop-up window with the user information does contain a green Message button, that would allow writing private forum messages.
If that is not available to you, yet, there also exists the OptiX-Help email address you’ll find at the bottom of the OptiX download page for exactly that purpose.