From 2d106a1138faa66d935fae2df89f0c9ba8a37ef9 Mon Sep 17 00:00:00 2001 From: Paul Kilgo Date: Thu, 24 Oct 2024 21:50:19 -0700 Subject: [PATCH 1/2] hdx: Set the debugName of HgiSamplerDesc for 1d luts --- pxr/imaging/hdx/colorCorrectionTask.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pxr/imaging/hdx/colorCorrectionTask.cpp b/pxr/imaging/hdx/colorCorrectionTask.cpp index b4bb87fded..f9c9c8389e 100644 --- a/pxr/imaging/hdx/colorCorrectionTask.cpp +++ b/pxr/imaging/hdx/colorCorrectionTask.cpp @@ -444,6 +444,7 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl( // Sampler description HgiSamplerDesc sampDesc; + sampDesc.debugName = samplerName; sampDesc.magFilter = interpolation == OCIO::Interpolation::INTERP_NEAREST ? HgiSamplerFilterNearest : HgiSamplerFilterLinear; From ec769ab42fe1dd427d40c1a3184db761348128a0 Mon Sep 17 00:00:00 2001 From: Paul Kilgo Date: Mon, 28 Oct 2024 14:15:38 -0700 Subject: [PATCH 2/2] hdx: Fix 1d luts using uninitialized texture buffer --- pxr/imaging/hdx/colorCorrectionTask.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pxr/imaging/hdx/colorCorrectionTask.cpp b/pxr/imaging/hdx/colorCorrectionTask.cpp index f9c9c8389e..282d4b81de 100644 --- a/pxr/imaging/hdx/colorCorrectionTask.cpp +++ b/pxr/imaging/hdx/colorCorrectionTask.cpp @@ -454,9 +454,14 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl( sampDesc.addressModeU = HgiSamplerAddressModeClampToEdge; sampDesc.addressModeV = HgiSamplerAddressModeClampToEdge; + std::vector lutVector = std::vector( + lutValues, + lutValues + (valueCount * sizeof(float)) + ); + result->luts.emplace_back( _TextureSamplerDesc{ - texDesc, sampDesc, float4AdaptedLutValues}); + texDesc, sampDesc, lutVector}); } //