From 874a6a2a6c210ffa16f5e617a6a561ddf4f831a3 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Sat, 7 May 2022 03:46:00 +0530 Subject: [PATCH] Fix `getTextureType` enum conversion fomatting --- .../gpu/interconnect/graphics_context.h | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index dd8dd7b8..e180e6c5 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -930,23 +930,34 @@ namespace skyline::gpu::interconnect { auto readConstantBuffer{[&executor = executor, &constantBuffers = pipelineStage.constantBuffers](u32 index, u32 offset) { return constantBuffers[index].Read(executor, offset); }}; + auto getTextureType{[this](u32 handle) { using TicType = TextureImageControl::TextureType; using ShaderType = ShaderCompiler::TextureType; switch (GetTextureImageControl(BindlessTextureHandle{handle}.textureIndex).textureType) { - case TicType::e1D: return ShaderType::Color1D; - case TicType::e1DArray: return ShaderType::ColorArray1D; - case TicType::e1DBuffer: return ShaderType::Buffer; + case TicType::e1D: + return ShaderType::Color1D; + case TicType::e1DArray: + return ShaderType::ColorArray1D; + case TicType::e1DBuffer: + return ShaderType::Buffer; - case TicType::e2D: return ShaderType::Color2D; - case TicType::e2DArray: return ShaderType::ColorArray2D; + case TicType::e2D: + case TicType::e2DNoMipmap: + return ShaderType::Color2D; + case TicType::e2DArray: + return ShaderType::ColorArray2D; - case TicType::e3D: return ShaderType::Color3D; + case TicType::e3D: + return ShaderType::Color3D; - case TicType::eCube: return ShaderType::ColorCube; - case TicType::eCubeArray: return ShaderType::ColorArrayCube; + case TicType::eCube: + return ShaderType::ColorCube; + case TicType::eCubeArray: + return ShaderType::ColorArrayCube; } }}; + if (!shader.invalidated && shader.program) shader.invalidated |= shader.program->VerifyState(readConstantBuffer, getTextureType);