We previously had each test run twice: once with -O0 and again with -O2. Because one tests the actual literal code specified in the shader (without the possibility of being optimized away) and the other tests the optimization to make sure it still matches. This patch extends the logic to allow the possibility of every test running in optix mode as well, if the code base is built with USE_OPTIX=1. For now, it only runs optix mode if the individual test has "optix" in its name, or if the test directory has a file called "OPTIX" present. Also, if environment variable TESTSUITE_OPTIX=1, it will try to run *all* tests with optix mode (that's just for me... most of them fail at the moment). The eventual goal is for these conditions to change, so that in a USE_OPTIX=1 build, *all* tests run optix flavors unless not marked with a NOOPTIX file in their directory. At the moment, *6* tests pass for me in OptiX mode. Now we can start attacking the features to get more and more tests to pass identically on CPU and GPU. I realized that there were many tests that are only trying to test that oslc issues the right error or warning for various malformed code, or that are only compiling the shader to test oslinfo, or a few other such cases that run oslc only and never try to execute their shaders. So I also liberally sprinkled NOOPTIX as well as NOOPTIMIZE marker files in those test directories, to skip optix tests, and also skip a second "optimized" run of the same test (which was pointless, because it wasn't executing at all).
2 lines
36 B
Plaintext
2 lines
36 B
Plaintext
oslinfo only, no need to test optix
|