[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
1 changed files with 4 additions and 4 deletions

View File

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