Skip to content

Commit

Permalink
PR/BatchedMath -- algebraic, trig, transcendental (#1385)
Browse files Browse the repository at this point in the history
Implement batched versions algebraic, trigonometric, and transcendental OSL library functions.
Add extensive regression tests to exercise binary and ternary operations with combinations of uniform, varying, and constant arguments.
Added some reusable xmacros for shaders in the testsuite/common/shader's directory to create unary, binary, and ternary test shaders.

Increase timeout of CI tests from 180 seconds to 240 seconds to allow comprehensive regression tests to complete.
Alternative is to break regression tests into separate test directories so the individually finish faster.

Signed-off-by: Alex M. Wells <alex.m.wells@intel.com>
  • Loading branch information
AlexMWells committed Jul 8, 2021
1 parent d6ec4b8 commit 27cc863
Show file tree
Hide file tree
Showing 233 changed files with 7,252 additions and 681 deletions.
2 changes: 1 addition & 1 deletion src/build-scripts/ci-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $OSL_ROOT/bin/testshade --help
echo "Parallel test " ${CTEST_PARALLEL_LEVEL}
pushd build/$PLATFORM
time ctest -C ${CMAKE_BUILD_TYPE} -E broken --force-new-ctest-process \
--output-on-failure --timeout ${CTEST_TEST_TIMEOUT:=180} ${CTEST_ARGS}
--output-on-failure --timeout ${CTEST_TEST_TIMEOUT:=240} ${CTEST_ARGS}
popd


Expand Down
18 changes: 12 additions & 6 deletions src/cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ macro (osl_add_all_tests)
# List all the individual testsuite tests here, except those that need
# special installed tests.
TESTSUITE ( aastep allowconnect-err and-or-not-synonyms arithmetic
arithmetic-reg
area-reg arithmetic-reg
array array-reg array-copy-reg array-derivs array-range
array-aassign array-assign-reg array-length-reg
blackbody blendmath breakcont breakcont-reg
bug-array-heapoffsets bug-locallifetime bug-outputinit
bug-param-duplicate bug-peep bug-return
calculatenormal-reg
cellnoise closure closure-array color comparison
compile-buffer compassign-reg
component-range
Expand All @@ -191,6 +192,7 @@ macro (osl_add_all_tests)
error-dupes error-serialized
example-deformer
exit exponential
filterwidth-reg
for-reg format-reg fprintf
function-earlyreturn function-simple function-outputelem
function-overloads function-redef
Expand All @@ -202,8 +204,8 @@ macro (osl_add_all_tests)
isconstant
layers layers-Ciassign layers-entry layers-lazy layers-lazyerror
layers-nonlazycopy layers-repeatedoutputs
linearstep
logic loop matrix matrix-reg matrix-arithmetic-reg
length-reg linearstep
logic loop matrix matrix-reg matrix-arithmetic-reg
matrix-compref-reg max-reg message
mergeinstances-duplicate-entrylayers
mergeinstances-nouserdata mergeinstances-vararray
Expand All @@ -212,6 +214,7 @@ macro (osl_add_all_tests)
noise noise-cell
noise-gabor noise-gabor2d-filter noise-gabor3d-filter
noise-perlin noise-simplex
normalize-reg
pnoise pnoise-cell pnoise-gabor pnoise-perlin
operator-overloading
opt-warnings
Expand Down Expand Up @@ -242,7 +245,8 @@ macro (osl_add_all_tests)
render-background render-bumptest
render-cornell render-furnace-diffuse
render-microfacet render-oren-nayar render-veachmis render-ward
select shaderglobals shortcircuit
select shaderglobals shortcircuit
smoothstep-reg
spline splineinverse splineinverse-ident
spline-boundarybug spline-derivbug
split-reg
Expand All @@ -262,13 +266,15 @@ macro (osl_add_all_tests)
texture-smallderivs texture-swirl texture-udim
texture-width texture-withderivs texture-wrap
trailing-commas
transcendental-reg
transitive-assign
transform transform-reg transformc trig typecast
transform transform-reg transformc trig trig-reg
typecast
unknown-instruction
userdata userdata-passthrough
vararray-connect vararray-default
vararray-deserialize vararray-param
vecctr vector
vecctr vector vector-reg
wavelength_color Werror xml )

# Add tests that require the Python bindings if we built them.
Expand Down
2 changes: 2 additions & 0 deletions src/liboslexec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ set ( liboslexec_target_srcs
wide/wide_opalgebraic
wide/wide_opmatrix
wide/wide_opstring
wide/wide_optranscendental
wide/wide_shadingsys
wide/wide_optrigonometric
)

set ( liboslexec_override_limits
Expand Down
Loading

0 comments on commit 27cc863

Please sign in to comment.