Skip to content

Abi check#68

Closed
remia wants to merge 37 commits into
RB-2.5from
abi-check
Closed

Abi check#68
remia wants to merge 37 commits into
RB-2.5from
abi-check

Conversation

@remia

@remia remia commented Jun 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Asheikhm and others added 30 commits October 28, 2025 17:24
…ion#2206)

* adding unit test for applyRGB buffer, check in the applyRGB if the buffer is C order or not, for now throw error

Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>

* Adsk Contrib - Detect C/F order, if not C order : RuntimeError shown, test is still not passing

Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>

* remove 1d arrays from the test, since even after Transpose, 1d arrays are still contiguous

Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>

---------

Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Enable Python 3.14 wheels

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Replace macos-13 by macos-15-intel

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Allow find_package CONFIG mode with Package_ROOT

Signed-off-by: Rémi Achard <remiachard@gmail.com>

---------

Signed-off-by: Rémi Achard <remiachard@gmail.com>
…2217)

Signed-off-by: Carol Payne <carol.alynn.payne@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* - Fix Windows Doxygen install script as Doxygen v1.16.0 changed the released zip name.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* double escape maybe?

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

---------

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
…2224)

* Addressing issue AcademySoftwareFoundation#1915, remove [0, 1] clamping from ICC profiles.

Currently the clamping is removed ONLY when the the type 0 (simple gamma) TRC is used. In this case the the mirroring around origin is used for the negative values.

Other parametric curves are currently implemented as 1DLuts thus will not handle out of bound values properly. In a later wave we can either convert LUTs to half-domain ones or try to implement them with more complex ops (such as exponent with linear).

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - Fixing the op tests in the inverse direction
- More detailed explanation for the clamp removal in pure-gamma TRC cases.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

---------

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
… in OpenColorIO::ThrowInvalidRegex (AcademySoftwareFoundation#2231)

This turned out to be not a UAF issue but an out-of-bounds-access issue where the throw was accessing the incorrect (and potentially shorter) string with an index derived from another (and potentially longer) string.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Fix texture binding index issue

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Add texture binding index getters

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Adjust addTexture return and fix Python binding

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Fix unit tests

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
… floating point rounding edge case (AcademySoftwareFoundation#2227)

* Add test to reproduce bug 2220

Code incorrectly deals with edge cases where atan2() returns end of range [-pi, pi]

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>

* Extend tables to have an additonal entry to allow for boundary condition to not over flow table bounds during lookup

All tables are now 1 entry larger and should have valid data wrapped into the extra entries

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>

* Clarify ACES OT 2.0 edge-case test comments around hue-angle table access bug

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>

---------

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…dation#2204)

* Fix ociocheck

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Minor improvements

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…ySoftwareFoundation#2230)

Add dependabot.yml to enable automated dependency updates for:
- GitHub Actions workflows (weekly)
- Python pip packages (weekly)

This follows OpenSSF Best Practices Badge recommendations and
is part of the Step Security hardening measures.

Part of AcademySoftwareFoundation#2035

Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…n#2229)

This adds a GitHub Actions workflow that signs release artifacts
using Sigstore, following the OpenSSF Best Practices Badge
recommendations. The workflow is triggered on release publication
and:

1. Creates a .tar.gz archive of the source tree
2. Signs the archive using sigstore/gh-action-sigstore-python
3. Uploads both the tarball and .sigstore.json credential bundle

Based on the OpenEXR release-sign.yml workflow template.

Closes AcademySoftwareFoundation#2034

Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
…ation#2261)

Removed the declaration of 'unit_test_failures' from UnitTest.h.

Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…cademySoftwareFoundation#2265)

* Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files.

- Added "Id" element support per the spec.

- Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)

- CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.

- Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)

- CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.

- Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements

- ociomakeclf tool now takes "--generateid" switch to for inserting newly added "Id element" into the target clf file.

TODO:

- Description and Descriptor elements need to collect the language attribute.

- non-default namespace attributes (e.g. xmlns:foo) needs to be collected as root level attributes.

- Those two TODO items need some re-factoring in the data collection code.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - Per the code review, exposing the newly added constant METADATA_ID_ELEMENT in python too.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - re-worked some part of the CLF parser and the CTFReaderTransform class to be able to collect richer metadata.
- Now collecting the language attribute of the Description, input and output descriptor elements.
- Also collecting the non-default xmlns attributes at the root level.
- Updated the tests accordingly.
- Replaced clf/pre-smpte_only/matrix_example.clf with clf/matrix_example_utf8.clf in some for some Reference tests.
- Added format information to the ociomakeclf tool's help text.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - nmake the compilers happy.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - make the compilers happy pt2

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - make the compilers happy pt3
(we need to make Windows compiler settings as picky as other platforms)

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

---------

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…#2270)

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…oundation#2197)

* For CPU processor, when source has no alpha make it default to 1.

Signed-off-by: pylee <penne.y.lee@intel.com>

* Fix alpha channel for integer types.

Signed-off-by: pylee <penne.y.lee@intel.com>

* Fix max alpha value to be from input bitdepth not output.

Signed-off-by: pylee <penne.y.lee@intel.com>

* Forgot to update ImagePacking.h

Signed-off-by: pylee <penne.y.lee@intel.com>

* Remove the unused inputBitDepth name causing compiler error.

Signed-off-by: pylee <penne.y.lee@intel.com>

* Update src/OpenColorIO/ImagePacking.cpp

Co-authored-by: Cuneyt Ozdas <github@cuneytozdas.com>
Signed-off-by: PenneLee <pennelee@gmail.com>

---------

Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: PenneLee <pennelee@gmail.com>
Co-authored-by: Cuneyt Ozdas <github@cuneytozdas.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Add release signing workflow using Sigstore (AcademySoftwareFoundation#2229)

This adds a GitHub Actions workflow that signs release artifacts
using Sigstore, following the OpenSSF Best Practices Badge
recommendations. The workflow is triggered on release publication
and:

1. Creates a .tar.gz archive of the source tree
2. Signs the archive using sigstore/gh-action-sigstore-python
3. Uploads both the tarball and .sigstore.json credential bundle

Based on the OpenEXR release-sign.yml workflow template.

Closes AcademySoftwareFoundation#2034

Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: pmady <pavan4devops@gmail.com>

* gpu: Add Vulkan unit test framework

Add initial Vulkan support for GPU unit testing in OpenColorIO.

This commit introduces:
- vulkanapp.h/cpp: Headless Vulkan rendering framework for GPU tests
- CMakeLists.txt updates: Conditional Vulkan build support with OCIO_VULKAN_ENABLED
- GPUUnitTest.cpp: --vulkan flag to run tests with Vulkan renderer

The Vulkan implementation uses compute shaders for color processing,
similar to the existing OpenGL and Metal implementations. It supports
headless rendering suitable for CI environments.

Note: GLSL to SPIR-V compilation requires linking against glslang or
shaderc library (marked as TODO in the implementation).

Issue Number: close AcademySoftwareFoundation#2209

Signed-off-by: pmady <pavan4devops@gmail.com>

* gpu: Implement GLSL to SPIR-V compilation using glslang

Add glslang library dependency for runtime GLSL to SPIR-V compilation
in the Vulkan unit test framework. This enables the Vulkan GPU tests
to actually run by compiling OCIO-generated GLSL shaders to SPIR-V.

Changes:
- CMakeLists.txt: Add find_package(glslang) and link glslang libraries
- vulkanapp.cpp: Implement compileGLSLToSPIRV() using glslang API

The implementation:
- Initializes glslang process (thread-safe, one-time init)
- Configures Vulkan 1.2 / SPIR-V 1.5 target environment
- Parses GLSL compute shader source
- Links shader program
- Generates optimized SPIR-V bytecode

Signed-off-by: pmady <pavan4devops@gmail.com>

* docs: Add comprehensive Vulkan testing guides for PR AcademySoftwareFoundation#2243

Add detailed testing documentation to help reviewers and contributors
test the Vulkan unit test framework locally.

Files added:
- VULKAN_TESTING_GUIDE.md: Comprehensive guide with installation
  instructions for macOS, Linux, and Windows, build configuration,
  troubleshooting, and platform-specific notes
- QUICK_TEST_STEPS.md: Quick reference guide with fast-track
  installation and testing steps for each platform

These guides address the request from @doug-walker to provide
instructions for installing Vulkan SDK and glslang dependencies
needed to test the Vulkan branch locally.

Signed-off-by: pmady <pavan4devops@gmail.com>

* Remove testing guide files - will provide as PR comment instead

Signed-off-by: pmady <pavan4devops@gmail.com>

* fix: Change Vulkan CMake definitions from PRIVATE to PUBLIC

Address feedback from @doug-walker regarding build issues:
- Change target_include_directories from PRIVATE to PUBLIC
- Change target_link_libraries from PRIVATE to PUBLIC
- Change target_compile_definitions from PRIVATE to PUBLIC

This allows dependent targets (like test_gpu_exec) to properly
access the OCIO_VULKAN_ENABLED definition and Vulkan libraries.

Signed-off-by: pmady <pavan4devops@gmail.com>

* fix: Add MoltenVK portability extension for macOS

Add VK_KHR_PORTABILITY_ENUMERATION extension and flag for macOS
to enable Vulkan instance creation with MoltenVK.

Signed-off-by: pmady <pavan4devops@gmail.com>

* feat: Integrate Vulkan test framework into GPU unit tests

Complete Vulkan test integration for OpenColorIO GPU unit tests:

- Add Vulkan-specific helper functions in GPUUnitTest.cpp:
  - AllocateImageTexture for VulkanApp
  - UpdateImageTexture for VulkanApp
  - UpdateOCIOVulkanState for VulkanApp
  - ValidateImageTexture for VulkanApp

- Wire VulkanApp into test execution loop with proper branching

- Fix VulkanApp initialization:
  - Add MoltenVK portability extension for macOS
  - Add bounds checking in compute shader
  - Fix cleanup order to destroy VulkanBuilder before device

- Fix CMake: Change PRIVATE to PUBLIC for Vulkan definitions

Test Results (macOS with MoltenVK):
- 155 tests PASSED (all non-LUT operations)
- 108 tests FAILED (LUT1D/LUT3D - require texture sampler support)

The LUT tests fail because 3D texture sampler support is not yet
implemented in VulkanBuilder. This is a known limitation that
requires additional work to implement texture allocation and
descriptor set updates for LUT textures.

Signed-off-by: pmady <pavan4devops@gmail.com>

* Add Vulkan uniform buffer and LUT texture support

- Implement VulkanBuilder uniform buffer creation and update for dynamic parameters
- Add 3D LUT texture allocation with RGBA format (RGB32F not supported on MoltenVK)
- Add 1D/2D LUT texture allocation with proper format handling
- Fix shader generation to use correct descriptor bindings for textures and uniforms
- Add std140 layout qualifier to OCIO uniform blocks
- Update descriptor set layout and pool sizes to include uniforms and textures
- Call updateUniforms() before each dispatch for dynamic parameter updates

Test results: 216/263 tests pass (82%)
Remaining failures are complex uniform blocks with vec3 types that need
additional std140 alignment handling.

Signed-off-by: pmady <pavan4devops@gmail.com>

* Fix Vulkan uniform buffer layout and 1D texture handling

- Use OCIO's getUniformBufferSize() and m_bufferOffset for correct std140 layout
- Write array data with 16-byte stride per element (std140 requirement)
- Add std140 layout qualifier to uniform blocks in shader generation
- Disable 1D textures for Vulkan (use 2D instead) for MoltenVK compatibility
- Add better exception handling in GPU unit tests for debugging

This fixes 108 additional Vulkan GPU tests, bringing the pass rate from
155/263 (59%) to 260/263 (98.9%). The 3 remaining failures are ACES2
precision-sensitive edge cases that may need Vulkan-specific tolerance
adjustments.

Signed-off-by: pmady <pavan4devops@gmail.com>

* Use OCIO's getTextureShaderBindingIndex API for Vulkan texture bindings

- Remove manual sampler declarations in buildShader(), use OCIO-generated ones
- Configure shader descriptor with setDescriptorSetIndex(0, 2) for Vulkan
  to start texture bindings at 2 (after input/output storage buffers)
- Use get3DTextureShaderBindingIndex() and getTextureShaderBindingIndex()
  for correct texture binding indices
- Add GPU diagnostic output to verify MoltenVK uses actual GPU hardware

This addresses review feedback from PR AcademySoftwareFoundation#2243 to use the new texture binding
API added in OCIO 2.5.1 (PR AcademySoftwareFoundation#2226) instead of manually declaring samplers.

Test results: 260/263 tests pass (98.9%)
Remaining 3 failures are ACES2 precision-sensitive edge cases.
GPU confirmed: Apple M2 Pro (Integrated GPU), not CPU emulation.

Signed-off-by: pmady <pavan4devops@gmail.com>

* Address PR review comments for Vulkan unit test framework

- Fix switch warning by explicitly handling VK_PHYSICAL_DEVICE_TYPE_OTHER
  and VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM cases
- Fix unused format parameter warning in transitionImageLayout
- Move input/output buffers to high bindings (100, 101) to avoid conflicts
  with OCIO's uniform binding at 0, eliminating need to edit shader text
- Refactor GPUUnitTest.cpp to share code between GL and Vulkan:
  - Extract PrepareInputValues helper for UpdateImageTexture
  - Extract ValidateResults and ValidateImageTextureImpl template for
    ValidateImageTexture
- Preserve Mac ARM ifdef for NaN/Infinity test disabling in Vulkan path
- Update texture binding start to 1 (was 2) since binding 0 is now used
  for OCIO uniforms

Signed-off-by: pmady <pavan4devops@gmail.com>

* Address PR review: use consecutive bindings and increase tolerances

- Change input/output buffer bindings from 100/101 to 1/2
- Update setDescriptorSetIndex(0, 3) so textures start at binding 3
- Increase test tolerances as requested:
  - Test 39 (line 306): 3e-6f -> 3e-5f
  - Test 49 (line 659): 0.018f -> 0.019f
  - Test 51 (line 696): 0.03f -> 0.032f
- Update comments to reflect the new binding strategy

Signed-off-by: pmady <pavan4devops@gmail.com>

---------

Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…ndation#2273)

1) Expat: 'MD' suffix is added on MSVC only, 'd' suffix is added on WIN32
2) ZLib: 'd' suffix is added only on MSVC

Signed-off-by: Dmitry Kazakov <dimula73@gmail.com>
AcademySoftwareFoundation#2276)

* Fix bug in hue curve python binding

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Pointer check improvement

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Dangling reference fix

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Update Linux CI to VFX 2026

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Implement TSC requests

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Add pypa action and improve Sonar stuff

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Update deploy site actions

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Remove more python 3.9

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Update latest dependabot

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…areFoundation#2285)

* Implement dependabot requests

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Revert Sphinx

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Update latest dependabot

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Add sphinx-press install

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Remove outdated comment

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* - Adding a CMake utility function to setup debugger environments so that the debugger can locate the run-time dependencies. This makes it possible to compile and launch the projects directly within visual studio for example.
- Calling the above function in projects that need it.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - white space fix

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - group the source files in IDE to replicate the source tree structure

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - Grouping the cpu test project sources to replicate the source tree structure. OCIO library files and the test files are separately grouped for better clarity.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

* - Make the gpu test CTest paths modification more robust

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>

---------

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Improve cmake and actions settings

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Bump sonarqube action

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Fix Windows documentation fail

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Fix Windows documentation fail, take 2

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…#2304)

Signed-off-by: Rémi Achard <remiachard@gmail.com>
…Foundation#2281)

* Fix OpenGL ES type issues in ACES2 FixedFunction Ops

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Update src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp

Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Add 2D texture path tests for ACES2 cusp and reach table sampling

Signed-off-by: Rémi Achard <remiachard@gmail.com>

---------

Signed-off-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
doug-walker and others added 7 commits May 6, 2026 17:59
…ySoftwareFoundation#2308)

* Various fixes suggested by Claude

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Address review comments

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Update security guidelines

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Address review comments

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Further max Lut3D size cleanup

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Improve cast to avoid possible warning

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…ation#2315)

* Fix 2023.3 Linux container break

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Adjust to keep the name constant to use the existing GitHub branch rules

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…demySoftwareFoundation#2271)

* Add DirectX 12 GPU backend for automated unit testing on Windows

Introduce a DirectX 12 / HLSL rendering backend alongside the existing OpenGL / GLSL and Metal / MSL backends, enabling the GPU unit test suite to run natively on Windows without requiring an OpenGL context.

Key changes:

  GraphicalApp abstract interface (graphicalapp.h/cpp)

    Backend-agnostic base class extracted from OglApp.  OglApp and MetalApp now inherit from it.

  DxApp (dxapp.h/cpp) -- DirectX 12 backend

    Off-screen RGBA32F render target, full-screen triangle via SV_VertexID, staging readback, SM 6.0 DXC shader compilation.

  HLSLBuilder (hlsl.h/cpp) -- HLSL shader generation

    Translates GpuShaderDesc into HLSL pixel shaders with 1D and 3D LUT texture uploads in RGBA32F format.

  CMake integration

    OCIO_DIRECTX_ENABLED option, FetchContent for DirectX-Headers, auto-copy of DXC runtime DLLs to the test output directory.

  Test tolerance adjustments

    Minor epsilon increases for 4 tests due to DX12/SM6.0 FMA and pow() precision differences.

  All 263 GPU tests pass on the DirectX 12 backend.

Build and run:

  # Configure (OCIO_DIRECTX_ENABLED defaults to ON on Windows)

  cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

  # Build the GPU test binary

  cmake --build build --target test_gpu_exec --config Release

  # Run GPU tests with the DX12 backend

  ctest --test-dir build -C Release -R test_dx

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Fix post-rebase issues found in code review

  - HeadlessOglApp::printGraphicsInfo() was calling pure virtual base (crash on headless EGL)
  - graphicalapp.cpp included oglapp.h unconditionally; guard under OCIO_GL_ENABLED
  - tests/gpu/CMakeLists.txt early-return guard excluded Vulkan-only builds
  - Add missing test_vulkan ctest entry

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Minor additional comments, formatting and fixes.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Speed up DX12 GPU test backend (~19%)

  The DX12 test suite was noticeably slower than the OpenGL and Vulkan backends. Profiling the run showed the gap was almost entirely in DXC shader
  compilation, not in Present, fence waits, or DxcCreateInstance as initially suspected.

  Three low-risk changes:

  - Cache IDxcUtils and IDxcCompiler3 as DxApp members instead of recreating them on every setShader() call. The COM instances are thread-safe and
  perfectly reusable; recreating them per test added no value.
  - Compile the full-screen-triangle vertex shader exactly once and reuse the bytecode across all tests. The VSMain HLSL is a hard-coded
  SV_VertexID-driven triangle with no test-specific state — the bytecode is identical every time. Extracted into a new ensureVertexShaderCompiled()
  helper. This alone eliminated the biggest redundancy (263 duplicate VS compiles).
  - Present(1, 0) → Present(0, 0). VSync is meaningless for an off-screen test harness that reads back from a float render target. Locally the win shows
  up mostly in waitForPreviousFrame, which was being throttled by the swap-chain pipeline even on an invisible window.

  All 263/263 tests still pass; no tolerance changes, no DXIL codegen changes (except for a UTF8 fix), no precision risk.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Several small fixes tidying up the recently-added GPU test infrastructure.

  - Fix unused-variable warnings (fatal on macOS with warnings-as-errors): guard useDxRenderer and useVulkanRenderer declarations with the same ifdefs as their usage sites. useMetalRenderer
   stays unconditional because it's referenced on all platforms.
  - Propagate the MSVC+shared-libs PATH workaround to test_vulkan so it can find OpenColorIO_*.dll at runtime, matching what's already done for test_dx.
  - Upgrade the dxcompiler.dll detection message from STATUS to WARNING and rewrite it to name OCIO_DIRECTX_ENABLED and offer concrete recovery paths. The previous STATUS message was easy
  to miss, leaving users with a silent degradation until test_dx failed at runtime.
  - Rename the OpenGL ctest from test_gpu to test_opengl now that sibling backend-specific tests (test_dx, test_vulkan, test_metal) exist. The test_gpu_exec binary keeps its name since it's
   backend-agnostic and selects via CLI flags.
  - Declare OCIO_VULKAN_ENABLED as a first-class CMake option with mark_as_advanced, matching the existing OCIO_DIRECTX_ENABLED. It was previously used in conditionals without ever being
  declared, so it never appeared as a toggle in ccmake/cmake-gui.
  - Document both OCIO_DIRECTX_ENABLED and OCIO_VULKAN_ENABLED in docs/quick_start/installation.rst, noting that Vulkan requires an external SDK.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Integrate DirectX-Headers with OCIO's external-package pattern

  Previously InstallDirectXHeaders.cmake was included unconditionally from oglapphelpers/CMakeLists.txt, so DirectX-Headers was always fetched from GitHub regardless of whether the user had
   a local copy installed. There was no way to use a system install, a vendored copy, or an air-gapped build, and the dep didn't respect OCIO_INSTALL_EXT_PACKAGES. DirectX-Headers is now a
  first-class OCIO dependency, handled the same way as Imath, ZLIB, yaml-cpp, etc.: try find_package first, fall back to FetchContent only if not found and OCIO_INSTALL_EXT_PACKAGES allows
  it.

  Changes:
  - New share/cmake/modules/FindDirectX-Headers.cmake, modeled on FindImath.cmake.
  - InstallDirectXHeaders.cmake → InstallDirectX-Headers.cmake (the hyphen matches OCIO's Install convention).
  - oglapphelpers/CMakeLists.txt now calls ocio_handle_dependency(DirectX-Headers ...) with MIN_VERSION 1.606.0 (Windows SDK 22H2 era — old enough to cover most installed copies) and
  RECOMMENDED_VERSION 1.619.1 (the version OCIO pins and validates).

  For users: a local DirectX-Headers install can now be supplied via any of the standard CMake mechanisms — -DDirectX-Headers_DIR, -DDirectX-Headers_ROOT, -DDirectX-Headers_INCLUDE_DIR, or
  globally with -DOCIO_INSTALL_EXT_PACKAGES=NONE to forbid any network fetch.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Improve dxcompiler.dll diagnostics and allow overriding its path

  Addresses test crashes seen on stuck Windows 10 hosts caused by an old dxcompiler.dll shipped in that host's Windows SDK Redist.

  - Print the version of the found dxcompiler.dll at configure time so crash reports identify the exact DXC build without follow-up diagnostics.
  - Emit a standing hint pointing at the DirectX Shader Compiler releases page, which is the documented workaround.
  - New -DOCIO_DXCOMPILER_DLL=<path> overrides the Windows SDK Redist search, letting users supply a newer DLL pre-build instead of copying it by hand after.
  - Extracted the DXC-runtime logic into share/cmake/utils/LocateDXCompilerRuntime.cmake so tests/gpu/CMakeLists.txt stays focused on the test target.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Minor comment tweaks in LocateDXCompilerRuntime.cmake.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Use OCIO_DirectX-Headers_RECOMMENDED_VERSION in InstallDirectX-Headers.cmake

  ocio_install_dependency already propagates the RECOMMENDED_VERSION from the
  ocio_handle_dependency call site. Consume it instead of hardcoding the
  version a second time. Matches the pattern in Installyaml-cpp.cmake and
  Installpystring.cmake.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Address local cleanup notes from PR AcademySoftwareFoundation#2271 Claude review.

* Name CbvSrvHeapSize and throw in setShader if a shader needs more SRV slots than the heap holds.
* Guard ~DxApp() so the GPU wait/CloseHandle are skipped when sync objects were never created (constructor partial-init).
* Comment the 16-byte float4 stride used when packing UNIFORM_VECTOR_FLOAT/INT arrays into the HLSL constant buffer.
* Only record m_windowClassName when RegisterClassExA actually succeeds, so cleanup won't unregister a class owned by another DxApp.
* Drop the redundant trailing else in GPUUnitTest.cpp's shadingLanguage selector (initializer already covers it).

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

---------

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…undation#2318)

* Fix potential cycle crash

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Clarify purpose of the various guards

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
…Foundation#2310)

* Add to PathUtils

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Python test switch to ExceptionMissingFile

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Updated tests to use ExceptionMissingFile instead

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Revert PathUtil related changes.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Remove PathUtils changes

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Switch exception raised for filepath not provided in CreateFromFile.

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Remove TODO

Signed-off-by: Mei Chu <meimchu@gmail.com>

* Add CVE to security (AcademySoftwareFoundation#2311)

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>

* Adsk Contrib - Fix 2023.3 Linux container break (AcademySoftwareFoundation#2315)

* Fix 2023.3 Linux container break

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Adjust to keep the name constant to use the existing GitHub branch rules

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>

* Add DirectX 12 GPU backend for automated unit testing on Windows (AcademySoftwareFoundation#2271)

* Add DirectX 12 GPU backend for automated unit testing on Windows

Introduce a DirectX 12 / HLSL rendering backend alongside the existing OpenGL / GLSL and Metal / MSL backends, enabling the GPU unit test suite to run natively on Windows without requiring an OpenGL context.

Key changes:

  GraphicalApp abstract interface (graphicalapp.h/cpp)

    Backend-agnostic base class extracted from OglApp.  OglApp and MetalApp now inherit from it.

  DxApp (dxapp.h/cpp) -- DirectX 12 backend

    Off-screen RGBA32F render target, full-screen triangle via SV_VertexID, staging readback, SM 6.0 DXC shader compilation.

  HLSLBuilder (hlsl.h/cpp) -- HLSL shader generation

    Translates GpuShaderDesc into HLSL pixel shaders with 1D and 3D LUT texture uploads in RGBA32F format.

  CMake integration

    OCIO_DIRECTX_ENABLED option, FetchContent for DirectX-Headers, auto-copy of DXC runtime DLLs to the test output directory.

  Test tolerance adjustments

    Minor epsilon increases for 4 tests due to DX12/SM6.0 FMA and pow() precision differences.

  All 263 GPU tests pass on the DirectX 12 backend.

Build and run:

  # Configure (OCIO_DIRECTX_ENABLED defaults to ON on Windows)

  cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

  # Build the GPU test binary

  cmake --build build --target test_gpu_exec --config Release

  # Run GPU tests with the DX12 backend

  ctest --test-dir build -C Release -R test_dx

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Fix post-rebase issues found in code review

  - HeadlessOglApp::printGraphicsInfo() was calling pure virtual base (crash on headless EGL)
  - graphicalapp.cpp included oglapp.h unconditionally; guard under OCIO_GL_ENABLED
  - tests/gpu/CMakeLists.txt early-return guard excluded Vulkan-only builds
  - Add missing test_vulkan ctest entry

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Minor additional comments, formatting and fixes.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Speed up DX12 GPU test backend (~19%)

  The DX12 test suite was noticeably slower than the OpenGL and Vulkan backends. Profiling the run showed the gap was almost entirely in DXC shader
  compilation, not in Present, fence waits, or DxcCreateInstance as initially suspected.

  Three low-risk changes:

  - Cache IDxcUtils and IDxcCompiler3 as DxApp members instead of recreating them on every setShader() call. The COM instances are thread-safe and
  perfectly reusable; recreating them per test added no value.
  - Compile the full-screen-triangle vertex shader exactly once and reuse the bytecode across all tests. The VSMain HLSL is a hard-coded
  SV_VertexID-driven triangle with no test-specific state — the bytecode is identical every time. Extracted into a new ensureVertexShaderCompiled()
  helper. This alone eliminated the biggest redundancy (263 duplicate VS compiles).
  - Present(1, 0) → Present(0, 0). VSync is meaningless for an off-screen test harness that reads back from a float render target. Locally the win shows
  up mostly in waitForPreviousFrame, which was being throttled by the swap-chain pipeline even on an invisible window.

  All 263/263 tests still pass; no tolerance changes, no DXIL codegen changes (except for a UTF8 fix), no precision risk.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Several small fixes tidying up the recently-added GPU test infrastructure.

  - Fix unused-variable warnings (fatal on macOS with warnings-as-errors): guard useDxRenderer and useVulkanRenderer declarations with the same ifdefs as their usage sites. useMetalRenderer
   stays unconditional because it's referenced on all platforms.
  - Propagate the MSVC+shared-libs PATH workaround to test_vulkan so it can find OpenColorIO_*.dll at runtime, matching what's already done for test_dx.
  - Upgrade the dxcompiler.dll detection message from STATUS to WARNING and rewrite it to name OCIO_DIRECTX_ENABLED and offer concrete recovery paths. The previous STATUS message was easy
  to miss, leaving users with a silent degradation until test_dx failed at runtime.
  - Rename the OpenGL ctest from test_gpu to test_opengl now that sibling backend-specific tests (test_dx, test_vulkan, test_metal) exist. The test_gpu_exec binary keeps its name since it's
   backend-agnostic and selects via CLI flags.
  - Declare OCIO_VULKAN_ENABLED as a first-class CMake option with mark_as_advanced, matching the existing OCIO_DIRECTX_ENABLED. It was previously used in conditionals without ever being
  declared, so it never appeared as a toggle in ccmake/cmake-gui.
  - Document both OCIO_DIRECTX_ENABLED and OCIO_VULKAN_ENABLED in docs/quick_start/installation.rst, noting that Vulkan requires an external SDK.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Integrate DirectX-Headers with OCIO's external-package pattern

  Previously InstallDirectXHeaders.cmake was included unconditionally from oglapphelpers/CMakeLists.txt, so DirectX-Headers was always fetched from GitHub regardless of whether the user had
   a local copy installed. There was no way to use a system install, a vendored copy, or an air-gapped build, and the dep didn't respect OCIO_INSTALL_EXT_PACKAGES. DirectX-Headers is now a
  first-class OCIO dependency, handled the same way as Imath, ZLIB, yaml-cpp, etc.: try find_package first, fall back to FetchContent only if not found and OCIO_INSTALL_EXT_PACKAGES allows
  it.

  Changes:
  - New share/cmake/modules/FindDirectX-Headers.cmake, modeled on FindImath.cmake.
  - InstallDirectXHeaders.cmake → InstallDirectX-Headers.cmake (the hyphen matches OCIO's Install convention).
  - oglapphelpers/CMakeLists.txt now calls ocio_handle_dependency(DirectX-Headers ...) with MIN_VERSION 1.606.0 (Windows SDK 22H2 era — old enough to cover most installed copies) and
  RECOMMENDED_VERSION 1.619.1 (the version OCIO pins and validates).

  For users: a local DirectX-Headers install can now be supplied via any of the standard CMake mechanisms — -DDirectX-Headers_DIR, -DDirectX-Headers_ROOT, -DDirectX-Headers_INCLUDE_DIR, or
  globally with -DOCIO_INSTALL_EXT_PACKAGES=NONE to forbid any network fetch.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Improve dxcompiler.dll diagnostics and allow overriding its path

  Addresses test crashes seen on stuck Windows 10 hosts caused by an old dxcompiler.dll shipped in that host's Windows SDK Redist.

  - Print the version of the found dxcompiler.dll at configure time so crash reports identify the exact DXC build without follow-up diagnostics.
  - Emit a standing hint pointing at the DirectX Shader Compiler releases page, which is the documented workaround.
  - New -DOCIO_DXCOMPILER_DLL=<path> overrides the Windows SDK Redist search, letting users supply a newer DLL pre-build instead of copying it by hand after.
  - Extracted the DXC-runtime logic into share/cmake/utils/LocateDXCompilerRuntime.cmake so tests/gpu/CMakeLists.txt stays focused on the test target.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Minor comment tweaks in LocateDXCompilerRuntime.cmake.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Use OCIO_DirectX-Headers_RECOMMENDED_VERSION in InstallDirectX-Headers.cmake

  ocio_install_dependency already propagates the RECOMMENDED_VERSION from the
  ocio_handle_dependency call site. Consume it instead of hardcoding the
  version a second time. Matches the pattern in Installyaml-cpp.cmake and
  Installpystring.cmake.

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

* Address local cleanup notes from PR AcademySoftwareFoundation#2271 Claude review.

* Name CbvSrvHeapSize and throw in setShader if a shader needs more SRV slots than the heap holds.
* Guard ~DxApp() so the GPU wait/CloseHandle are skipped when sync objects were never created (constructor partial-init).
* Comment the 16-byte float4 stride used when packing UNIFORM_VECTOR_FLOAT/INT arrays into the HLSL constant buffer.
* Only record m_windowClassName when RegisterClassExA actually succeeds, so cleanup won't unregister a class owned by another DxApp.
* Drop the redundant trailing else in GPUUnitTest.cpp's shadingLanguage selector (initializer already covers it).

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>

---------

Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>

---------

Signed-off-by: Mei Chu <meimchu@gmail.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Éric Renaud-Houde <eric.renaud.houde@gmail.com>
@remia remia closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.