The OpenGL specs require that the storage image qualifier in shaders (e.g., "rgba32f") needs to be compatible with the format of a bound image (see https://registry.khronos.org/OpenGL/specs/gl/glspec46.core.pdf#page=318). We know that Blender currently does not handle this correctly in multiple places. AMD and NVIDIA seem to silently ignore a mismatch and just seem to use the format of the bound image. However, for the Intel Windows drivers, this seems to lead to visual corruptions (#141436, #141173). While a more graceful handling of a mismatch may be nice, this is in line with the OpenGL specs. This PR adds code for validating image formats for bindings. Pull Request: https://projects.blender.org/blender/blender/pulls/143791
23 lines
445 B
C++
23 lines
445 B
C++
/* SPDX-FileCopyrightText: 2016 by Mike Erwin. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*
|
|
* This interface allow GPU to manage GL objects for multiple context and threads.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_string_ref.hh"
|
|
#include "BLI_vector.hh"
|
|
|
|
namespace blender::gpu {
|
|
|
|
using DebugStack = Vector<StringRef>;
|
|
|
|
void debug_validate_binding_image_format();
|
|
|
|
} // namespace blender::gpu
|