Use Sint/Uint attribute type in place of Sscaled/Uscaled

Scaled formats are not supported by any mobile GPUs.
This commit is contained in:
Billy Laws 2022-09-29 21:09:58 +01:00
parent 92ce220d3a
commit 0b808cc22b

View File

@ -77,12 +77,12 @@ namespace skyline::gpu::interconnect::maxwell3d {
switch (attribute.numericalType) { switch (attribute.numericalType) {
case engine::VertexAttribute::NumericalType::Snorm: case engine::VertexAttribute::NumericalType::Snorm:
case engine::VertexAttribute::NumericalType::Unorm: case engine::VertexAttribute::NumericalType::Unorm:
case engine::VertexAttribute::NumericalType::Sscaled:
case engine::VertexAttribute::NumericalType::Uscaled:
case engine::VertexAttribute::NumericalType::Float: case engine::VertexAttribute::NumericalType::Float:
return Shader::AttributeType::Float; return Shader::AttributeType::Float;
case engine::VertexAttribute::NumericalType::Sscaled:
case engine::VertexAttribute::NumericalType::Sint: case engine::VertexAttribute::NumericalType::Sint:
return Shader::AttributeType::SignedInt; return Shader::AttributeType::SignedInt;
case engine::VertexAttribute::NumericalType::Uscaled:
case engine::VertexAttribute::NumericalType::Uint: case engine::VertexAttribute::NumericalType::Uint:
return Shader::AttributeType::UnsignedInt; return Shader::AttributeType::UnsignedInt;
default: default:
@ -300,6 +300,11 @@ namespace skyline::gpu::interconnect::maxwell3d {
FORMAT_NORM_INT_SCALED_CASE(size, vkFormat); \ FORMAT_NORM_INT_SCALED_CASE(size, vkFormat); \
FORMAT_CASE(size, Float, Sfloat, 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) { switch (componentBitWidths | numericalType) {
/* 8-bit components */ /* 8-bit components */
FORMAT_NORM_INT_SCALED_CASE(R8, eR8); FORMAT_NORM_INT_SCALED_CASE(R8, eR8);