Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:AndnoVember:test
OpenUSD
2651.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2651.patch of Package OpenUSD
From 9fe8cf65ed05ec53f5ddbb5ffb08851e02f4adc8 Mon Sep 17 00:00:00 2001 From: Matt Johnson <matt.johnson@epicgames.com> Date: Tue, 5 Sep 2023 16:02:48 -0400 Subject: [PATCH] hdx: update color correction task to support building against OpenColorIO 2.3.0 OpenColorIO version 2.3.0 introduced a TextureDimensions enum parameter to GpuShaderCreator::getTexture(). This directly determines the dimensions (1D vs 2D) of the texture rather than inferring it from whether the height of the texture is one. More detail about this change is available from the OpenColorIO commit here: https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/929d5364c458cffffb3f4694f1786cbd999ed49b --- pxr/imaging/hdx/colorCorrectionTask.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pxr/imaging/hdx/colorCorrectionTask.cpp b/pxr/imaging/hdx/colorCorrectionTask.cpp index 960199fa1c..525e05c105 100644 --- a/pxr/imaging/hdx/colorCorrectionTask.cpp +++ b/pxr/imaging/hdx/colorCorrectionTask.cpp @@ -409,8 +409,16 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl( uint32_t width, height; OCIO::GpuShaderCreator::TextureType channel; OCIO::Interpolation interpolation; + +#if OCIO_VERSION_HEX >= 0x02030000 + OCIO::GpuShaderCreator::TextureDimensions dimensions; + shaderDesc->getTexture(i, textureName, samplerName, width, height, + channel, dimensions, interpolation); +#else shaderDesc->getTexture(i, textureName, samplerName, width, height, channel, interpolation); +#endif // OCIO_VERSION_HEX >= 0x02030000 + shaderDesc->getTextureValues(i, lutValues); int channelPerPix = @@ -432,7 +440,16 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl( // Texture description HgiTextureDesc texDesc; texDesc.debugName = textureName; - texDesc.type = height == 1 ? HgiTextureType1D : HgiTextureType2D; + + texDesc.type = +#if OCIO_VERSION_HEX >= 0x02030000 + dimensions == OCIO::GpuShaderCreator::TextureDimensions::TEXTURE_1D ? + HgiTextureType1D : + HgiTextureType2D; +#else + height == 1 ? HgiTextureType1D : HgiTextureType2D; +#endif // OCIO_VERSION_HEX >= 0x02030000 + texDesc.dimensions = GfVec3i(width, height, 1); texDesc.format = fmt; texDesc.layerCount = 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor