1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxbc] Fix off-by-one error for primitive vertex counts

Not sure if it's even possible to use this, but this was clearly a bug.
This commit is contained in:
Philip Rebohle 2022-08-09 02:44:05 +02:00
parent d6253aeae6
commit eddbe73ba4
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -15,11 +15,11 @@ namespace dxvk {
};
if (primitive >= DxbcPrimitive::Patch1) {
return static_cast<uint32_t>(primitive)
- static_cast<uint32_t>(DxbcPrimitive::Patch1);
return uint32_t(primitive)
- uint32_t(DxbcPrimitive::Patch1)
+ 1u;
} else {
return s_vertexCounts.at(
static_cast<uint32_t>(primitive));
return s_vertexCounts.at(uint32_t(primitive));
}
}