[graphics/krita] /: Remove support for the outdated OpenColorIO 1.x.x

Dmitry Kazakov null at kde.org
Thu Jan 29 12:08:36 GMT 2026


Git commit 1f3d42cbc6089445b850cb3664539ef39f1c7375 by Dmitry Kazakov.
Committed on 29/01/2026 at 12:08.
Pushed by dkazakov into branch 'master'.

Remove support for the outdated OpenColorIO 1.x.x

Since 2021 VFX Reference Platform has OpenColorIO 2.x and most
of the distributions have already completed the transition, so we
can easily switch to supporting v2.x.x only. Krita AppImage itsef uses
OCIO v2.3.0, so it should be a noop for the official packages.

The current status of the packages in distributions:

openSUSE Tumbleweed - 2.5.1
openSUSE Leap 15.6 - EOL April 2026 - 2.5.1
openSUSE Leap 16.0 - EOL October 2027 - 2.5.1

Ubuntu 22.04 - 1.1.1
Ubuntu 24.04 - 2.1.3
Ubuntu 25.04 - 2.1.3
Ubuntu 25.10 - 2.1.3

Fedora Rawhide - 2.4.2-8.fc44
Fedora 43 2.4.2-6.fc43
Fedora 42 2.4.2-1.fc42
Fedora EPEL 8 1.1.1-8.el8
Fedora EPEL 10.2 2.4.2-7.el10_2

Krita AppImage - 2.3.0

Only Ubuntu 22.04 and RHEL8 use the outdated OCIO, but
they are not going to package Krita anyway. Krita AppImage
should run fine on them.

CC:kimageshop at kde.org

M  +1    -4    CMakeLists.txt
M  +0    -3    config-ocio.h.cmake
M  +0    -10   krita/data/shaders/highq_downscale.frag
M  +0    -11   krita/data/shaders/simple_texture_legacy.frag
M  +0    -3    libs/ui/opengl/kis_opengl_shader_loader.cpp
M  +4    -11   plugins/dockers/lut/CMakeLists.txt
M  +0    -8    plugins/dockers/lut/lutdocker_dock.h
D  +0    -413  plugins/dockers/lut/ocio_display_filter_vfx2020.cpp
D  +0    -88   plugins/dockers/lut/ocio_display_filter_vfx2020.h
M  +1    -11   plugins/dockers/lut/tests/CMakeLists.txt
M  +0    -4    plugins/dockers/lut/tests/kis_ocio_display_filter_test.cpp

https://invent.kde.org/graphics/krita/-/commit/1f3d42cbc6089445b850cb3664539ef39f1c7375

diff --git a/CMakeLists.txt b/CMakeLists.txt
index daff95309ce..d7193d2512e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1246,16 +1246,13 @@ if (FFTW3_FOUND)
     find_library(FFTW3_THREADS_LIB fftw3_threads PATHS ${FFTW3_LIBRARY_DIRS})
 endif()
 
-find_package(OpenColorIO 1.1.1)
+find_package(OpenColorIO 2.0.0)
 set_package_properties(OpenColorIO PROPERTIES
     DESCRIPTION "The OpenColorIO Library"
     URL "https://www.opencolorio.org"
     TYPE OPTIONAL
     PURPOSE "Required by the Krita LUT docker")
 macro_bool_to_01(OpenColorIO_FOUND HAVE_OCIO)
-if (OPENCOLORIO_VERSION VERSION_GREATER_EQUAL "2.0.0")
-    set(HAVE_OCIO_V2 TRUE)
-endif()
 configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h)
 
 set_package_properties(PythonLibrary PROPERTIES
diff --git a/config-ocio.h.cmake b/config-ocio.h.cmake
index b4cdcbf6928..99cb0ee6b19 100644
--- a/config-ocio.h.cmake
+++ b/config-ocio.h.cmake
@@ -2,6 +2,3 @@
 
 /* Define if you have ocio, the OpenColorIO Library */
 #cmakedefine HAVE_OCIO 1
-
-/* Define if OpenColorIO is v2.0 and higher */
-#cmakedefine HAVE_OCIO_V2 1
diff --git a/krita/data/shaders/highq_downscale.frag b/krita/data/shaders/highq_downscale.frag
index 10fd122d4aa..e33e86e0753 100644
--- a/krita/data/shaders/highq_downscale.frag
+++ b/krita/data/shaders/highq_downscale.frag
@@ -6,12 +6,6 @@
 
 uniform sampler2D texture0;
 
-#ifdef USE_OCIO
-#ifndef USE_OCIO_V2
-uniform sampler3D texture1;
-#endif
-#endif
-
 in vec4 v_textureCoordinate;
 out vec4 fragColor;
 
@@ -124,11 +118,7 @@ void main() {
     }
 
 #ifdef USE_OCIO
-#ifdef USE_OCIO_V2
     fragColor = OCIODisplay(col);
-#else /* USE_OCIO_V2 */
-    fragColor = OCIODisplay(col, texture1);
-#endif /* USE_OCIO_V2 */
 #else /* USE_OCIO */
     fragColor = col;
 #endif /* USE_OCIO */
diff --git a/krita/data/shaders/simple_texture_legacy.frag b/krita/data/shaders/simple_texture_legacy.frag
index a6a3b44ee57..833af41cea5 100644
--- a/krita/data/shaders/simple_texture_legacy.frag
+++ b/krita/data/shaders/simple_texture_legacy.frag
@@ -8,23 +8,12 @@ uniform sampler2D texture0;
 
 varying mediump vec4 v_textureCoordinate;
 
-#ifdef USE_OCIO
-#ifndef USE_OCIO_V2
-uniform sampler3D texture1;
-#endif
-#endif /* USE_OCIO */
-
-
 void main() {
     vec4 col = texture2D(texture0, v_textureCoordinate.st);
 
 
 #ifdef USE_OCIO
-#ifdef USE_OCIO_V2
     gl_FragColor = OCIODisplay(col);
-#else /* USE_OCIO_V2 */
-    gl_FragColor = OCIODisplay(col, texture1);
-#endif /* USE_OCIO_V2 */
 #else /* USE_OCIO */
     gl_FragColor = col;
 #endif /* USE_OCIO */
diff --git a/libs/ui/opengl/kis_opengl_shader_loader.cpp b/libs/ui/opengl/kis_opengl_shader_loader.cpp
index bec43f0b19c..443d025e4c4 100644
--- a/libs/ui/opengl/kis_opengl_shader_loader.cpp
+++ b/libs/ui/opengl/kis_opengl_shader_loader.cpp
@@ -147,9 +147,6 @@ KisShaderProgram *KisOpenGLShaderLoader::loadDisplayShader(QSharedPointer<KisDis
     bool haveDisplayFilter = displayFilter && !displayFilter->program().isEmpty();
     if (haveDisplayFilter) {
         fragHeader.append("#define USE_OCIO\n");
-#ifdef HAVE_OCIO_V2
-        fragHeader.append("#define USE_OCIO_V2\n");
-#endif
         fragHeader.append(displayFilter->program().toLatin1());
     }
 
diff --git a/plugins/dockers/lut/CMakeLists.txt b/plugins/dockers/lut/CMakeLists.txt
index 464d56bf4b0..5d5c5c777df 100644
--- a/plugins/dockers/lut/CMakeLists.txt
+++ b/plugins/dockers/lut/CMakeLists.txt
@@ -9,17 +9,10 @@ ki18n_wrap_ui(kritalutdocker_static_SRCS
   wdglut.ui
 )
 
-if (HAVE_OCIO_V2)
-  set(kritalutdocker_static_SRCS
-    ${kritalutdocker_static_SRCS}
-    ocio_display_filter_vfx2021.cpp
-  )
-else()
-  set(kritalutdocker_static_SRCS
-    ${kritalutdocker_static_SRCS}
-    ocio_display_filter_vfx2020.cpp
-  )
-endif()
+set(kritalutdocker_static_SRCS
+  ${kritalutdocker_static_SRCS}
+  ocio_display_filter_vfx2021.cpp
+)
 
 kis_add_library(kritalutdocker_static STATIC ${kritalutdocker_static_SRCS})
 
diff --git a/plugins/dockers/lut/lutdocker_dock.h b/plugins/dockers/lut/lutdocker_dock.h
index 90520fb6089..ec64073eeb4 100644
--- a/plugins/dockers/lut/lutdocker_dock.h
+++ b/plugins/dockers/lut/lutdocker_dock.h
@@ -24,21 +24,13 @@
 
 #include <config-ocio.h>
 
-#ifndef HAVE_OCIO_V2
-#define OCIO_VERSION_FULL_STR OCIO_VERSION
-#endif
-
 namespace OCIO = OCIO_NAMESPACE;
 
 class BlackWhitePointChooser;
 
 #include <config-ocio.h>
 
-#ifdef HAVE_OCIO_V2
 #include "ocio_display_filter_vfx2021.h"
-#else
-#include "ocio_display_filter_vfx2020.h"
-#endif
 
 #include "kis_exposure_gamma_correction_interface.h"
 
diff --git a/plugins/dockers/lut/ocio_display_filter_vfx2020.cpp b/plugins/dockers/lut/ocio_display_filter_vfx2020.cpp
deleted file mode 100644
index a8840f0f751..00000000000
--- a/plugins/dockers/lut/ocio_display_filter_vfx2020.cpp
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- *  SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud at valdyas.org>
- *  SPDX-FileCopyrightText: 2021 L. E. Segovia <amy at amyspark.me>
- *
- *  SPDX-License-Identifier: GPL-2.0-or-later
- */
-#include "ocio_display_filter_vfx2020.h"
-
-#include <cstdlib>
-#include <cmath>
-#include <cstdio>
-#include <cstring>
-#include <iostream>
-#include <fstream>
-#include <sstream>
-
-#include <kis_config.h>
-
-#include <opengl/kis_opengl.h>
-#include <QOpenGLContext>
-#include <QOpenGLFunctions_3_2_Core>
-#include <QOpenGLFunctions_3_0>
-#include <QOpenGLFunctions_2_0>
-#include <QOpenGLExtraFunctions>
-
-#if defined(QT_OPENGL_ES_2)
-#define GL_RGBA16F_ARB GL_RGBA16F_EXT
-#define GL_RGB16F_ARB GL_RGB16F_EXT
-#endif
-
-#if defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_3)
-#define GL_R32F GL_R32F_EXT
-#define GL_RED GL_RED_EXT
-#define GL_TEXTURE_WRAP_R GL_TEXTURE_WRAP_R_OES
-#endif
-
-#include "kis_context_thread_locale.h"
-
-OcioDisplayFilter::OcioDisplayFilter(KisExposureGammaCorrectionInterface *interface, QObject *parent)
-    : KisDisplayFilter(parent)
-    , m_interface(interface)
-{
-}
-
-OcioDisplayFilter::~OcioDisplayFilter()
-{
-}
-
-KisExposureGammaCorrectionInterface* OcioDisplayFilter::correctionInterface() const
-{
-    return m_interface;
-}
-
-void OcioDisplayFilter::filter(quint8 *pixels, quint32 numPixels)
-{
-    // processes that data _in_ place
-    if (m_processor) {
-        OCIO::PackedImageDesc img(reinterpret_cast<float*>(pixels), numPixels, 1, 4);
-        m_processor->apply(img);
-    }
-}
-
-void OcioDisplayFilter::approximateInverseTransformation(quint8 *pixels, quint32 numPixels)
-{
-    // processes that data _in_ place
-    if (m_reverseApproximationProcessor) {
-        OCIO::PackedImageDesc img(reinterpret_cast<float*>(pixels), numPixels, 1, 4);
-        m_reverseApproximationProcessor->apply(img);
-    }
-}
-
-void OcioDisplayFilter::approximateForwardTransformation(quint8 *pixels, quint32 numPixels)
-{
-    // processes that data _in_ place
-    if (m_forwardApproximationProcessor) {
-        OCIO::PackedImageDesc img(reinterpret_cast<float*>(pixels), numPixels, 1, 4);
-        m_forwardApproximationProcessor->apply(img);
-    }
-}
-
-bool OcioDisplayFilter::useInternalColorManagement() const
-{
-    return forceInternalColorManagement;
-}
-
-bool OcioDisplayFilter::lockCurrentColorVisualRepresentation() const
-{
-    return m_lockCurrentColorVisualRepresentation;
-}
-
-void OcioDisplayFilter::setLockCurrentColorVisualRepresentation(bool value)
-{
-    m_lockCurrentColorVisualRepresentation = value;
-}
-
-QString OcioDisplayFilter::program() const
-{
-    return m_program;
-}
-
-void OcioDisplayFilter::updateProcessor()
-{
-    if (!config) {
-        return;
-    }
-
-    if (!displayDevice) {
-        displayDevice = config->getDefaultDisplay();
-    }
-
-    if (!view) {
-        view = config->getDefaultView(displayDevice);
-    }
-
-    if (!inputColorSpaceName) {
-        inputColorSpaceName = config->getColorSpaceNameByIndex(0);
-    }
-    if (!look) {
-    look = config->getLookNameByIndex(0);
-    }
-
-    if (!displayDevice || !view || !inputColorSpaceName) {
-        return;
-    }
-
-    OCIO::DisplayTransformRcPtr transform = OCIO::DisplayTransform::Create();
-    transform->setInputColorSpaceName(inputColorSpaceName);
-    transform->setDisplay(displayDevice);
-    transform->setView(view);
-
-    /**
-     * Look support:
-     * As the OCIO docs will tell you, looks are a aesthetic transform that is
-     * added onto the mix.
-     * A view+display can have it's own assigned Look, or list of looks, and these
-     * can be overridden optionally.
-     * What the OCIO docs won't tell you is that a display transform won't use the
-     * looks attached to it unless "skipColorSpaceConversions" is false...
-     * I have no idea what "skipColorSpaceConversions" is beyond what it says on the
-     * tin. It is not mentioned in the documentation anywhere. Or on the website.
-     * Or how to set it. Or unset it. Why it is apparently set true to begin with.
-     * Only that, apparently, this was done with non-color data in mind...
-     *
-     * Until there's clear documentation on how to use this feature, I am afraid the
-     * override is all we can offer.
-     */
-    if (config->getLook(look)) {
-       transform->setLooksOverride(look);
-       transform->setLooksOverrideEnabled(true);
-    }
-
-    OCIO::GroupTransformRcPtr approximateTransform = OCIO::GroupTransform::Create();
-
-    // fstop exposure control -- not sure how that translates to our exposure
-    {
-        float exposureGain = powf(2.0f, exposure);
-
-        const qreal minRange = 0.001;
-        if (qAbs(blackPoint - whitePoint) < minRange) {
-            whitePoint = blackPoint + minRange;
-        }
-
-        const float oldMin[] = { blackPoint, blackPoint, blackPoint, 0.0f };
-        const float oldMax[] = { whitePoint, whitePoint, whitePoint, 1.0f };
-
-        const float newMin[] = { 0.0f, 0.0f, 0.0f, 0.0f };
-        const float newMax[] = { exposureGain, exposureGain, exposureGain, 1.0f };
-
-        float m44[16];
-        float offset4[4];
-        OCIO::MatrixTransform::Fit(m44, offset4, oldMin, oldMax, newMin, newMax);
-        OCIO::MatrixTransformRcPtr mtx =  OCIO::MatrixTransform::Create();
-        mtx->setValue(m44, offset4);
-        transform->setLinearCC(mtx);
-
-        // approximation (no color correction);
-        approximateTransform->push_back(mtx);
-    }
-
-    // channel swizzle
-    {
-        int channelHot[4];
-        switch (swizzle) {
-        case LUMINANCE:
-            channelHot[0] = 1;
-            channelHot[1] = 1;
-            channelHot[2] = 1;
-            channelHot[3] = 0;
-            break;
-        case RGBA:
-            channelHot[0] = 1;
-            channelHot[1] = 1;
-            channelHot[2] = 1;
-            channelHot[3] = 1;
-            break;
-        case R:
-            channelHot[0] = 1;
-            channelHot[1] = 0;
-            channelHot[2] = 0;
-            channelHot[3] = 0;
-            break;
-        case G:
-            channelHot[0] = 0;
-            channelHot[1] = 1;
-            channelHot[2] = 0;
-            channelHot[3] = 0;
-            break;
-        case B:
-            channelHot[0] = 0;
-            channelHot[1] = 0;
-            channelHot[2] = 1;
-            channelHot[3] = 0;
-            break;
-        case A:
-            channelHot[0] = 0;
-            channelHot[1] = 0;
-            channelHot[2] = 0;
-            channelHot[3] = 1;
-        default:
-            ;
-        }
-        float lumacoef[3];
-        config->getDefaultLumaCoefs(lumacoef);
-        float m44[16];
-        float offset[4];
-        OCIO::MatrixTransform::View(m44, offset, channelHot, lumacoef);
-        OCIO::MatrixTransformRcPtr swizzleTransform = OCIO::MatrixTransform::Create();
-        swizzleTransform->setValue(m44, offset);
-        transform->setChannelView(swizzleTransform);
-    }
-
-    // Post-display transform gamma
-    {
-        float exponent = 1.0f/std::max(1e-6f, static_cast<float>(gamma));
-        const float exponent4f[] = { exponent, exponent, exponent, exponent };
-        OCIO::ExponentTransformRcPtr expTransform =  OCIO::ExponentTransform::Create();
-        expTransform->setValue(exponent4f);
-        transform->setDisplayCC(expTransform);
-
-        // approximation (no color correction);
-        approximateTransform->push_back(expTransform);
-    }
-
-    try {
-        AutoSetAndRestoreThreadLocale l;
-        m_processor = config->getProcessor(transform);
-    } catch (OCIO::Exception &e) {
-        // XXX: How to not break the OCIO shader now?
-        errKrita << "OCIO exception while parsing the current context:" << e.what();
-        m_shaderDirty = false;
-        return;
-    }
-
-    m_forwardApproximationProcessor = config->getProcessor(approximateTransform, OCIO::TRANSFORM_DIR_FORWARD);
-
-    try {
-        m_reverseApproximationProcessor = config->getProcessor(approximateTransform, OCIO::TRANSFORM_DIR_INVERSE);
-    } catch (...) {
-        warnKrita << "OCIO inverted matrix does not exist!";
-        //m_reverseApproximationProcessor;
-    }
-
-    m_shaderDirty = true;
-}
-
-bool OcioDisplayFilter::updateShader()
-{
-    if (KisOpenGL::hasOpenGLES()) {
-        QOpenGLContext *ctx = QOpenGLContext::currentContext();
-
-        KIS_ASSERT_RECOVER_RETURN_VALUE(ctx, false);
-        if (ctx->format().majorVersion() >= 3) {
-            QOpenGLExtraFunctions *f = ctx->extraFunctions();
-            if (f) {
-                return updateShaderImpl(f);
-            }
-        } else if (ctx->hasExtension("GL_OES_texture_half_float") && ctx->hasExtension("GL_EXT_color_buffer_half_float")
-                && ctx->hasExtension("GL_OES_texture_half_float_linear")) {
-                QOpenGLExtraFunctions *f = ctx->extraFunctions();
-                if (f) {
-                    return updateShaderImpl(f);
-                }
-        } else {
-            dbgKrita << "OcioDisplayFilter::updateShader (2020)"
-                     << "OpenGL ES v2+ support detected but no OES_texture_half_float,"
-                        "GL_EXT_color_buffer_half_float or GL_OES_texture_half_float_linear were found";
-            return false;
-        }
-#if defined(QT_OPENGL_3)
-    } else if (KisOpenGL::hasOpenGL3()) {
-        QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
-        if (f) {
-            return updateShaderImpl(f);
-        }
-#endif
-    }
-
-    // XXX This option can be removed once we move to Qt 5.7+
-    if (KisOpenGL::supportsLoD()) {
-#if defined(QT_OPENGL_3)
-#if defined(Q_OS_MAC) && defined(QT_OPENGL_3_2)
-        QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
-#else
-        QOpenGLFunctions_3_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>();
-#endif
-        if (f) {
-            return updateShaderImpl(f);
-        }
-#endif
-    }
-#if !defined(QT_OPENGL_ES_2)
-    QOpenGLFunctions_2_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_2_0>();
-    if (f) {
-        return updateShaderImpl(f);
-    }
-#endif
-
-    return false;
-}
-
-template <class F>
-bool OcioDisplayFilter::updateShaderImpl(F *f) {
-    // check whether we are allowed to use shaders -- though that should
-    // work for everyone these days
-    KisConfig cfg(true);
-    if (!cfg.useOpenGL()) return false;
-
-    if (!m_shaderDirty) return false;
-
-    if (!f) {
-        qWarning() << "Failed to get valid OpenGL functions for OcioDisplayFilter!";
-        return false;
-    }
-
-    f->initializeOpenGLFunctions();
-
-    bool shouldRecompileShader = false;
-
-    const int lut3DEdgeSize = cfg.ocioLutEdgeSize();
-
-    if (m_lut3d.size() == 0) {
-        //dbgKrita << "generating lut";
-        f->glGenTextures(1, &m_lut3dTexID);
-
-        int num3Dentries = 3 * lut3DEdgeSize * lut3DEdgeSize * lut3DEdgeSize;
-        m_lut3d.fill(0.0, num3Dentries);
-
-        f->glActiveTexture(GL_TEXTURE1);
-        f->glBindTexture(GL_TEXTURE_3D, m_lut3dTexID);
-
-        f->glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-        f->glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        f->glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-        f->glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-        f->glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
-        f->glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB16F_ARB,
-                        lut3DEdgeSize, lut3DEdgeSize, lut3DEdgeSize,
-                        0, GL_RGB, GL_FLOAT, &m_lut3d.constData()[0]);
-    }
-
-    // Step 1: Create a GPU Shader Description
-    OCIO::GpuShaderDesc shaderDesc;
-
-    if (KisOpenGL::supportsLoD()) {
-        shaderDesc.setLanguage(OCIO::GPU_LANGUAGE_GLSL_1_3);
-    }
-    else {
-        shaderDesc.setLanguage(OCIO::GPU_LANGUAGE_GLSL_1_0);
-    }
-
-
-    shaderDesc.setFunctionName("OCIODisplay");
-    shaderDesc.setLut3DEdgeLen(lut3DEdgeSize);
-
-
-    // Step 2: Compute the 3D LUT
-    QString lut3dCacheID = QString::fromLatin1(m_processor->getGpuLut3DCacheID(shaderDesc));
-    if (lut3dCacheID != m_lut3dcacheid) {
-        //dbgKrita << "Computing 3DLut " << m_lut3dcacheid;
-        m_lut3dcacheid = lut3dCacheID;
-        m_processor->getGpuLut3D(&m_lut3d[0], shaderDesc);
-
-        f->glBindTexture(GL_TEXTURE_3D, m_lut3dTexID);
-        f->glTexSubImage3D(GL_TEXTURE_3D, 0,
-                                  0, 0, 0,
-                                  lut3DEdgeSize, lut3DEdgeSize, lut3DEdgeSize,
-                                  GL_RGB, GL_FLOAT, &m_lut3d[0]);
-    }
-
-    // Step 3: Generate the shader text
-    QString shaderCacheID = QString::fromLatin1(m_processor->getGpuShaderTextCacheID(shaderDesc));
-    if (m_program.isEmpty() || shaderCacheID != m_shadercacheid) {
-        //dbgKrita << "Computing Shader " << m_shadercacheid;
-
-        m_shadercacheid = shaderCacheID;
-
-        std::ostringstream os;
-        os << m_processor->getGpuShaderText(shaderDesc) << "\n";
-
-        m_program = QString::fromLatin1(os.str().c_str());
-        shouldRecompileShader = true;
-    }
-
-    m_shaderDirty = false;
-    return shouldRecompileShader;
-}
-
-void OcioDisplayFilter::setupTextures(GLFunctions *f, QOpenGLShaderProgram *program) const
-{
-    f->glActiveTexture(GL_TEXTURE0 + 1);
-    f->glBindTexture(GL_TEXTURE_3D, m_lut3dTexID);
-    program->setUniformValue(program->uniformLocation("texture1"), 1);
-}
diff --git a/plugins/dockers/lut/ocio_display_filter_vfx2020.h b/plugins/dockers/lut/ocio_display_filter_vfx2020.h
deleted file mode 100644
index 58871e07ab1..00000000000
--- a/plugins/dockers/lut/ocio_display_filter_vfx2020.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *  SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud at valdyas.org>
- *  SPDX-FileCopyrightText: 2021 L. E. Segovia <amy at amyspark.me>
- *
- *  SPDX-License-Identifier: GPL-2.0-or-later
- */
-#ifndef OCIO_DISPLAY_FILTER_H
-#define OCIO_DISPLAY_FILTER_H
-
-#include <QOpenGLShaderProgram>
-
-#include <OpenColorIO.h>
-#include <OpenColorTransforms.h>
-#include <OpenColorTypes.h>
-
-#include <kis_display_filter.h>
-#include <kis_exposure_gamma_correction_interface.h>
-
-namespace OCIO = OCIO_NAMESPACE;
-
-enum OCIO_CHANNEL_SWIZZLE {
-    LUMINANCE,
-    RGBA,
-    R,
-    G,
-    B,
-    A
-};
-
-class OcioDisplayFilter : public KisDisplayFilter
-{
-    Q_OBJECT
-public:
-    explicit OcioDisplayFilter(KisExposureGammaCorrectionInterface *interface, QObject *parent = 0);
-    ~OcioDisplayFilter();
-
-    void filter(quint8 *pixels, quint32 numPixels) override;
-    void approximateInverseTransformation(quint8 *pixels, quint32 numPixels) override;
-    void approximateForwardTransformation(quint8 *pixels, quint32 numPixels) override;
-    bool useInternalColorManagement() const override;
-    bool lockCurrentColorVisualRepresentation() const override;
-    void setLockCurrentColorVisualRepresentation(bool value);
-
-    bool updateShader() override;
-    template <class F>
-    bool updateShaderImpl(F *f);
-
-    void setupTextures(GLFunctions *f, QOpenGLShaderProgram *program) const override;
-
-    KisExposureGammaCorrectionInterface *correctionInterface() const override;
-
-    virtual QString program() const override;
-
-    void updateProcessor();
-
-    OCIO::ConstConfigRcPtr config;
-
-    const char *inputColorSpaceName {nullptr};
-    const char *displayDevice {nullptr};
-    const char *view {nullptr};
-    const char *look {nullptr};
-    OCIO_CHANNEL_SWIZZLE swizzle {RGBA};
-    float exposure {0.0};
-    float gamma {0.0};
-    float blackPoint {0.0};
-    float whitePoint {0.0};
-    bool forceInternalColorManagement {false};
-
-private:
-
-    OCIO::ConstProcessorRcPtr m_processor;
-    OCIO::ConstProcessorRcPtr m_reverseApproximationProcessor;
-    OCIO::ConstProcessorRcPtr m_forwardApproximationProcessor;
-
-    KisExposureGammaCorrectionInterface *m_interface {nullptr};
-
-    bool m_lockCurrentColorVisualRepresentation {false};
-
-    QString m_program;
-    GLuint m_lut3dTexID {0};
-    QVector<float> m_lut3d;
-    QString m_lut3dcacheid;
-    QString m_shadercacheid;
-
-    bool m_shaderDirty {true};
-};
-
-#endif // OCIO_DISPLAY_FILTER_H
diff --git a/plugins/dockers/lut/tests/CMakeLists.txt b/plugins/dockers/lut/tests/CMakeLists.txt
index dd29d92d7b3..5b187437398 100644
--- a/plugins/dockers/lut/tests/CMakeLists.txt
+++ b/plugins/dockers/lut/tests/CMakeLists.txt
@@ -1,19 +1,9 @@
 ########### next target ###############
 
-if (HAVE_OCIO_V2)
-  set(KRITA_LUTDOCKER_SOURCES
-    ../ocio_display_filter_vfx2021.cpp
-  )
-else()
-  set(KRITA_LUTDOCKER_SOURCES
-    ../ocio_display_filter_vfx2020.cpp
-  )
-endif()
-
 kis_add_test(
     kis_ocio_display_filter_test.cpp
     ../black_white_point_chooser.cpp  
-    ${KRITA_LUTDOCKER_SOURCES}
+    ../ocio_display_filter_vfx2021.cpp
      $<TARGET_PROPERTY:kritatestsdk,SOURCE_DIR>/stroke_testing_utils.cpp
     TEST_NAME KisOcioDisplayFilterTest
     LINK_LIBRARIES kritaui OpenColorIO::OpenColorIO KF${KF_MAJOR}::I18n kritatestsdk kritalutdocker_static
diff --git a/plugins/dockers/lut/tests/kis_ocio_display_filter_test.cpp b/plugins/dockers/lut/tests/kis_ocio_display_filter_test.cpp
index 94ce460aab0..99c436cf90d 100644
--- a/plugins/dockers/lut/tests/kis_ocio_display_filter_test.cpp
+++ b/plugins/dockers/lut/tests/kis_ocio_display_filter_test.cpp
@@ -20,11 +20,7 @@
 #include <kis_canvas_resource_provider.h>
 
 #include <config-ocio.h>
-#ifdef HAVE_OCIO_V2
 #include <ocio_display_filter_vfx2021.h>
-#else
-#include <ocio_display_filter_vfx2020.h>
-#endif
 
 void KisOcioDisplayFilterTest::test()
 {


More information about the kimageshop mailing list