Commit Graph

27 Commits

Author SHA1 Message Date
Jeroen Bakker
6872fb1aaf Vulkan: Disable Workbench image log render tests
The image log render tests uses an EXR that contains INF. Workbench
with specular enabled will mix these INFs, but there is a difference
in behavior between OpenGL and Vulkan.

In OpenGL mix(0.05, INF, 0.0) will result in INF
In Vulkan this results in NaN.

This should eventually be solved in the engine to ensure consistency.
For now we disable the render test and document the limitation.

Pull Request: https://projects.blender.org/blender/blender/pulls/146648
2025-09-23 16:45:30 +02:00
Jeroen Bakker
e0a056574d Fix: Vulkan: Volume Workbench Tests
Due to an incorrect assumption float buffers were converted to sRGB
values when uploading to an sRGBA8 texture. This is done when rendering
flames in workbench and resulted in to bright renders.

This PR removes sRGB encoding when uploading float values to sRGBA8 textures.

Fixes:
- render/openvdb/fire
- render/openvdb/principled_blackbody
- render/openvdb/smoke_fire

Pull Request: https://projects.blender.org/blender/blender/pulls/146636
2025-09-23 14:44:42 +02:00
Clément Foucault
4fe75da973 EEVEE: Remove all remaining reference of EEVEE next
This changes the engine identifier back to `BLENDER_EEVEE`.

We keep the `BLENDER_EEVEE_NEXT` identifier around for
versioning reasons (have to detect when it is the active
engine of a older file).

This also rename a bunch of pannels that were using `next`
in their name.

This is a breaking change for Addons compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/140282
2025-06-13 12:36:14 +02:00
Clément Foucault
dde18802a5 GPU: Remove WITH_GPU_RENDER_TESTS_SILENT option
This was introduced during EEVEE-next developement
cycle to not make the buildbot fail because of EEVEE
render tests.

These have stabilized now and we can remove this option.

Pull Request: https://projects.blender.org/blender/blender/pulls/137545
2025-04-15 17:56:16 +02:00
Alaska
ea7d07098b Tests: Disable --cycles-device arguments on non-Cycles tests
This commit reworks the RenderReport base class to avoid adding
`--cycles-device` device arguments to non Cycles tests.

This reduces some warnings that can show up with EEVEE and
Workbench tests that accidentally used these arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/133724
2025-01-30 04:15:27 +01:00
Sybren A. Stüvel
b7028617ad Refactor: render tests, change how argparse is used
Some changes to how argparse is used in render tests:

1. Use the common approach of one dash for single-letter options (`-b`)
   and two dashes for longer options (`--blender`). In this commit that
   just means changing single-dashed (`-testdir`) to double-dashed
   (`--testdir`).

2. Remove unnecessary `nargs` arguments. The code was telling `argparse`
   to put CLI arguments into a list of one item, and then had code to
   turn that one-item list into the item itself. I've just removed the
   `nargs` argument altogether, as that just produces the desired
   value without requiring more code.

   I've also removed `nargs="+"` from the handling of the `--blender`
   parameter, as that allowed for multiple occurrences of `--blender
   {path}` but was silently ignoring all of those except the first.

   To ensure that required arguments are present, the code now uses
   `required=True` instead of `nargs`.

3. Add a `description` parameter so that `--help` shows what the
   test script actually does. Also it helps people (like me) who want
   to figure out which blend file is actually being opened by the
   test, without making the test itself more verbose.

No functional changes, except that you now cannot add multiple
`--blender` arguments any more (the CLI invocation will fail). This wasn't
used anywhere I could find, though.

Pull Request: https://projects.blender.org/blender/blender/pulls/131666
2024-12-10 14:52:34 +01:00
Jeroen Bakker
eeefd9a69c Vulkan: Enable render tests
This PR enabled backend specific rendertest for EEVEE and Workbench.
Some changes that have been made are:
- Add suffix to the test identifying the backend (_opengl, _vulkan, _metal)
- Vulkan render tests are compared with the opengl results.

Most EEVEE tests run as expected there are some issues in the Vulkan
backend that needs to be addressed:
- Fully smooth reflective materials miss lighting.
- Tangent normals are off

None of the workbench tests pass. It has to do with downloading the depth
buffer. In Workbench they are stored as GPU_DEPTH32F_STENCIL8 and downloaded
as FLOAT. We didn't implement it in the vulkan backend yet and currently asserts.

The Vulkan render test run faster compared to OpenGL. On my system around
25-50% faster.

Pull Request: https://projects.blender.org/blender/blender/pulls/126784
2024-09-05 13:58:14 +02:00
Campbell Barton
2119d271e0 Cleanup: remove "-noaudio" argument in background mode
This is no longer needed as background mode implies -noaudio.
2024-02-14 00:13:38 +11:00
Jeroen Bakker
324ef0cbf4 RenderTest: GPU Render Tests Pass Silently
Add silently fail option to GPU based render tests. This is a pre-requisite to enable
render tests on the buildbot. By default these render tests will pass silently.

* Test will pass when using the `--pass-silently` arguments.
* Only crashes will be reported as failed tests.
* To find out failing test, review the test reports.

`WITH_GPU_RENDER_TESTS_SILENT` compile option can be used to let tests pass (default)
or fail (default for developers).

Although some tests fail, they still passed. In the generated render report,
the silently passed failures are correctly reported to be failures.

Pull Request: https://projects.blender.org/blender/blender/pulls/117629
2024-01-29 15:39:14 +01:00
Sergey Sharybin
f11292104d Render Tests: Separate difference of Color and Alpha
This change fixes confusion situation when the render output
is an RGBA image: the difference in color was not visible in
the report because alpha channel was all zeros. This is due
to idiff performing per-channel difference.

The solution to this problem is to have separate images for
color and alpha difference, which makes it clear where the
difference actually is coming from.
2024-01-25 10:04:16 +01:00
Campbell Barton
c5dd51a4dc Fix syntax error in workbench_render_tests
Correct even if the test isn't used, since syntax errors can trip up
checking tools.
2024-01-25 10:37:30 +11:00
Brecht Van Lommel
dccbc27eab Tests: add WIITH_TESTS_BATCHED option to execute Blender once per test
Some tests like cycles, sequencer and compositor batch together multiple
tests in a single Blender invocation. This makes them run faster, but
makes debugging harder. This is an option to disable that batching.

Pull Request: https://projects.blender.org/blender/blender/pulls/114603
2023-11-08 18:41:33 +01:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton
89811cb96f Cleanup: unused-imports in tests/ 2023-07-25 21:43:53 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Jeroen Bakker
585d81ba2b Workbench: Increase render tests fail threshold for hair.
When running the render test cases on MacOS/Intel the hair render
test fail. Most likely due to the dense geometry and the low
resolution of the test image.

This patch increases the fail threshold so these tests will pass.
Note that I haven't been able to test whether this is also the case
for Linux/Windows. If that is the case we should remove the platform
specific test.
2022-06-24 14:09:15 +02:00
Campbell Barton
c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Brecht Van Lommel
dd391d38f6 Tests: add CMake option to run Cycles regression tests on GPU devices
CYCLES_TEST_DEVICES is a list of devices (CPU, CUDA, OPTIX, OPENCL). It is set
to CPU only by default.

Test output is now writen to build/tests/cycles/<device>, and the HTML report
has separate report pages for the different devices, with option to compare
between CPU and GPU renders.

Various GPU tests are still failing due to CPU/GPU differences, these are to be
fixed or blacklisted still.

Ref T82193
2020-11-30 13:40:33 +01:00
Jacques Lucke
8a9912eaf8 Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.

The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D8665
2020-08-26 22:02:02 +02:00
Sybren A. Stüvel
be5c9d45bd Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.

This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:

- On Windows, the `python….exe` from the installation directory. This is
  just like before this patch, except that this patch adds the
  overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.

Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.

If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.

Differential Revision: https://developer.blender.org/D7395

Reviewed by: campbellbarton, mont29, sergey
2020-04-24 17:10:22 +02:00
Brecht Van Lommel
6f516fcc63 Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process.

This was previously reverted due to skipping other tests when one test
crashed. Now if a test crashes, Blender is re-run with the remaining
tests so we get results from them still.
2019-06-27 12:46:04 +02:00
Brecht Van Lommel
51c6dfd7f0 Tests: add navigation links for HTML test reports, and other tweaks 2019-06-26 15:06:49 +02:00
Brecht Van Lommel
b9ce1fee42 Fix broken workbench tests after recent changes 2019-05-20 16:35:34 +02:00
Brecht Van Lommel
3b51260387 Revert "Tests: speed up render tests by running multiple in the same process"
This makes finding the crashing tests harder, reverting until there is a
better solution.

This reverts commit 93901e7f0a.
2019-05-16 15:50:47 +02:00
Brecht Van Lommel
93901e7f0a Tests: speed up render tests by running multiple in the same process
Blender startup time and shader compilation is a big factor when running
hundreds of tests, so now all renders in the same ctest run in the same
process. If a test crashes, the remaining tests in the same category will
be marked as skipped.

Benchmarked on a quad core with ctest -j8.

cycles: 118.1s -> 94.3s
eevee: 66.2s -> 29.2s
workbench: 31.7s -> 8.6s
2019-05-11 00:12:05 +02:00
Brecht Van Lommel
79b9596c66 Tests: fix eevee and workbench using Cycles in a few tests 2019-05-10 23:45:51 +02:00
Brecht Van Lommel
fb3e138cee Tests: add Eevee reference images, and add workbench tests
Being able to compare Eevee reference images is useful for refactoring I'm
working on so might as well add them now, even if we can still improve them.

Workbench tests are just rendering the same files as Cycles and Eevee. This
doesn't really tests many workbench settings until we add tests specifically
for them, but does cover how it it handles the different object types.
2019-05-06 20:10:08 +02:00