forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
texture3d testing, fixes, refactoring, coverage (AcademySoftwareFound…
…ation#3699) * More extensive testing of texture3d: handle vs filename, subimages, >4 channels, closest sample interpolation. * Fixes for tex3d > 4 chan that turned out to be broken. * Some rearrangement for the >4 channel case * Refactor and simplify accum3d_sample_bilinear so multiple data types all use the same templated code path. * This all reduces the amount of untested code in OIIO by another 0.4%.
- Loading branch information
Showing
11 changed files
with
264 additions
and
239 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Created texture system | ||
Result of get_texture_info resolution (as int[2]) = true 33x33 | ||
Result of get_texture_info resolution (as int[3]) = true 33x33x33 | ||
Result of get_texture_info channels = true 1 | ||
Result of get_texture_info channels = true 1 | ||
Result of get_texture_info data format = true float | ||
Result of get_texture_info datawindow (as int[4]) = true [-16 -16 16 16] | ||
Result of get_texture_info datawindow (as int[6]) = true [-16 -16 -16 16 16 16] | ||
Result of get_texture_info displaywindow (as int[4]) = true [-12 -12 12 12] | ||
Result of get_texture_info displaywindow (as int[6]) = true [-12 -12 -12 12 12 12] | ||
Result of get_texture_info datetime = false | ||
Result of get_texture_info averagecolor = no | ||
Result of get_texture_info averagealpha = no | ||
Result of get_texture_info constantcolor = no | ||
Result of get_texture_info constantalpha = no | ||
Texture type is true Volume Texture | ||
|
||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out.exr | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out-handle.exr | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out-5chan.exr | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out-subimage0.exr | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out-subimagedensity.exr | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = out-subimagemissing.exr | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
Created texture system | ||
Testing BATCHED texture3d ../openvdb/src/sphere.vdb, output = closest.exr | ||
Comparing "out.exr" and "ref/out.exr" | ||
PASS | ||
Comparing "out-handle.exr" and "ref/out-handle.exr" | ||
PASS | ||
Comparing "out-5chan.exr" and "ref/out-5chan.exr" | ||
PASS | ||
Comparing "out-subimage0.exr" and "ref/out-subimage0.exr" | ||
PASS | ||
Comparing "out-subimagedensity.exr" and "ref/out-subimagedensity.exr" | ||
PASS | ||
Comparing "out-subimagemissing.exr" and "ref/out-subimagemissing.exr" | ||
PASS | ||
Comparing "closest.exr" and "ref/closest.exr" | ||
PASS |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,48 @@ | ||
Created texture system | ||
Result of get_texture_info resolution = 1 33x33 | ||
Result of get_texture_info channels = 1 1 | ||
Result of get_texture_info channels = 1 1 | ||
Result of get_texture_info data format = 1 float | ||
Result of get_texture_info datetime = 0 | ||
Result of get_texture_info resolution (as int[2]) = true 33x33 | ||
Result of get_texture_info resolution (as int[3]) = true 33x33x33 | ||
Result of get_texture_info channels = true 1 | ||
Result of get_texture_info channels = true 1 | ||
Result of get_texture_info data format = true float | ||
Result of get_texture_info datawindow (as int[4]) = true [-16 -16 16 16] | ||
Result of get_texture_info datawindow (as int[6]) = true [-16 -16 -16 16 16 16] | ||
Result of get_texture_info displaywindow (as int[4]) = true [-12 -12 12 12] | ||
Result of get_texture_info displaywindow (as int[6]) = true [-12 -12 -12 12 12 12] | ||
Result of get_texture_info datetime = false | ||
Result of get_texture_info averagecolor = no | ||
Result of get_texture_info averagealpha = no | ||
Result of get_texture_info constantcolor = no | ||
Texture type is 1 Volume Texture | ||
Result of get_texture_info constantalpha = no | ||
Texture type is true Volume Texture | ||
|
||
Testing 3d texture ../openvdb/src/sphere.vdb, output = out.exr | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out.exr | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out-handle.exr | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out-5chan.exr | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out-subimage0.exr | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out-subimagedensity.exr | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = out-subimagemissing.exr | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
ERROR: Unknown subimage "missing" in texture "../openvdb/src/sphere.vdb" | ||
Created texture system | ||
Testing texture3d ../openvdb/src/sphere.vdb, output = closest.exr | ||
Comparing "out.exr" and "ref/out.exr" | ||
PASS | ||
Comparing "out-handle.exr" and "ref/out-handle.exr" | ||
PASS | ||
Comparing "out-5chan.exr" and "ref/out-5chan.exr" | ||
PASS | ||
Comparing "out-subimage0.exr" and "ref/out-subimage0.exr" | ||
PASS | ||
Comparing "out-subimagedensity.exr" and "ref/out-subimagedensity.exr" | ||
PASS | ||
Comparing "out-subimagemissing.exr" and "ref/out-subimagemissing.exr" | ||
PASS | ||
Comparing "closest.exr" and "ref/closest.exr" | ||
PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,38 @@ | ||
#!/usr/bin/env python | ||
|
||
command = testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 ../openvdb/src/sphere.vdb") | ||
outputs = [ "out.exr" ] | ||
redirect = ">> out.txt 2>&1" | ||
|
||
# basic | ||
command += testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"../openvdb/src/sphere.vdb -o out.exr") | ||
|
||
# handles, derivatives | ||
command += testtex_command("--handle --derivs --no-gettextureinfo " | ||
"-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-o out-handle.exr ../openvdb/src/sphere.vdb") | ||
|
||
# more channels | ||
command += testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-nchannels 5 --no-gettextureinfo ../openvdb/src/sphere.vdb -o out-5chan.exr") | ||
|
||
# subimages | ||
command += testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-subimage 0 --no-gettextureinfo ../openvdb/src/sphere.vdb -o out-subimage0.exr") | ||
command += testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-subimagename density --no-gettextureinfo ../openvdb/src/sphere.vdb -o out-subimagedensity.exr") | ||
command += testtex_command("-res 2 2 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-subimagename missing --no-gettextureinfo ../openvdb/src/sphere.vdb -o out-subimagemissing.exr") | ||
|
||
# interp and mip modes | ||
command += testtex_command("-res 128 128 --nowarp --offset 5 5 5 --scalest 3 3 " | ||
"-interpmode 0 --no-gettextureinfo " | ||
"../openvdb/src/sphere.vdb -o closest.exr") | ||
|
||
outputs = [ "out.exr", | ||
"out-handle.exr", | ||
"out-5chan.exr", | ||
"out-subimage0.exr", | ||
"out-subimagedensity.exr", | ||
"out-subimagemissing.exr", | ||
"closest.exr", | ||
"out.txt" ] |