diff --git a/src/shader_recompiler/environment.h b/src/shader_recompiler/environment.h index 5dbbc7e61..f6a7e64a8 100644 --- a/src/shader_recompiler/environment.h +++ b/src/shader_recompiler/environment.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -22,6 +23,8 @@ public: [[nodiscard]] virtual TextureType ReadTextureType(u32 raw_handle) = 0; + [[nodiscard]] virtual SamplerComponentType ReadTextureComponentType(u32 raw_handle) = 0; + [[nodiscard]] virtual TexturePixelFormat ReadTexturePixelFormat(u32 raw_handle) = 0; [[nodiscard]] virtual bool IsTexturePixelFormatInteger(u32 raw_handle) = 0; diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index 74c402632..fb1f0697c 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h @@ -158,6 +158,14 @@ enum class ImageFormat : u32 { R32G32B32A32_SFLOAT, }; +enum class SamplerComponentType : u8 { + Float, + Sint, + Uint, + Depth, + Stencil, +}; + enum class Interpolation { Smooth, Flat, @@ -211,6 +219,7 @@ using ImageBufferDescriptors = boost::container::small_vector