mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #11207 from Pokechu22/invalid-normal-count
VideoCommon: Treat invalid normal count as NormalTangentBinormal
This commit is contained in:
commit
9ef7a3b44c
@ -270,11 +270,9 @@ static void CheckCPConfiguration(int vtx_attr_group)
|
|||||||
num_xf_normals = 1;
|
num_xf_normals = 1;
|
||||||
break;
|
break;
|
||||||
case NormalCount::NormalTangentBinormal:
|
case NormalCount::NormalTangentBinormal:
|
||||||
|
case NormalCount::Invalid: // see https://bugs.dolphin-emu.org/issues/13070
|
||||||
num_xf_normals = 3;
|
num_xf_normals = 3;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
PanicAlertFmt("xfmem.invtxspec.numnormals is invalid: {}", xfmem.invtxspec.numnormals);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_cp_colors != xfmem.invtxspec.numcolors || num_cp_normals != num_xf_normals ||
|
if (num_cp_colors != xfmem.invtxspec.numcolors || num_cp_normals != num_xf_normals ||
|
||||||
|
@ -45,12 +45,21 @@ enum class NormalCount : u32
|
|||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
Normal = 1,
|
Normal = 1,
|
||||||
NormalTangentBinormal = 2
|
NormalTangentBinormal = 2,
|
||||||
|
// Hardware testing indicates that this beahves the same as NormalTangentBinormal.
|
||||||
|
// Call of Duty: Black Ops uses this in some cases; see https://bugs.dolphin-emu.org/issues/13070
|
||||||
|
Invalid = 3,
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<NormalCount> : EnumFormatter<NormalCount::NormalTangentBinormal>
|
struct fmt::formatter<NormalCount> : EnumFormatter<NormalCount::Invalid>
|
||||||
{
|
{
|
||||||
constexpr formatter() : EnumFormatter({"None", "Normal only", "Normal, tangent, and binormal"}) {}
|
static constexpr array_type names = {
|
||||||
|
"None",
|
||||||
|
"Normal only",
|
||||||
|
"Normal, tangent, and binormal",
|
||||||
|
"Invalid (Normal, tangent, and binormal)",
|
||||||
|
};
|
||||||
|
constexpr formatter() : EnumFormatter(names) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Texture generation type
|
// Texture generation type
|
||||||
|
Loading…
Reference in New Issue
Block a user