From 0b808cc22bde5679a931ac05502f962e570b52f8 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Thu, 29 Sep 2022 21:09:58 +0100 Subject: [PATCH] Use Sint/Uint attribute type in place of Sscaled/Uscaled Scaled formats are not supported by any mobile GPUs. --- .../gpu/interconnect/maxwell_3d/pipeline_manager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp index 8c97bfa6..8aa66635 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_manager.cpp @@ -77,12 +77,12 @@ namespace skyline::gpu::interconnect::maxwell3d { switch (attribute.numericalType) { case engine::VertexAttribute::NumericalType::Snorm: case engine::VertexAttribute::NumericalType::Unorm: - case engine::VertexAttribute::NumericalType::Sscaled: - case engine::VertexAttribute::NumericalType::Uscaled: case engine::VertexAttribute::NumericalType::Float: return Shader::AttributeType::Float; + case engine::VertexAttribute::NumericalType::Sscaled: case engine::VertexAttribute::NumericalType::Sint: return Shader::AttributeType::SignedInt; + case engine::VertexAttribute::NumericalType::Uscaled: case engine::VertexAttribute::NumericalType::Uint: return Shader::AttributeType::UnsignedInt; default: @@ -300,6 +300,11 @@ namespace skyline::gpu::interconnect::maxwell3d { FORMAT_NORM_INT_SCALED_CASE(size, vkFormat); \ FORMAT_CASE(size, Float, Sfloat, vkFormat) + if (numericalType == engine::VertexAttribute::NumericalType::Sscaled) + numericalType = engine::VertexAttribute::NumericalType::Sint; + else if (numericalType == engine::VertexAttribute::NumericalType::Uscaled) + numericalType = engine::VertexAttribute::NumericalType::Uint; + switch (componentBitWidths | numericalType) { /* 8-bit components */ FORMAT_NORM_INT_SCALED_CASE(R8, eR8);