d3d12: CMP vertex format has 4 members.

Fix 1878
This commit is contained in:
vlj 2016-09-12 00:05:14 +02:00
parent 30b804e0bc
commit 14205d3d1c
2 changed files with 5 additions and 3 deletions

View File

@ -455,10 +455,10 @@ DXGI_FORMAT get_vertex_attribute_format(rsx::vertex_base_type type, u8 size)
{
switch (size)
{
case 1: return DXGI_FORMAT_R16G16B16A16_SNORM;
case 1:
case 2:
case 3:
case 4: fmt::throw_exception("Unsupported CMP vertex format with size > 1" HERE);
case 3: fmt::throw_exception("Unsupported CMP vertex format with size > 1" HERE);
case 4: return DXGI_FORMAT_R16G16B16A16_SNORM;
}
break;
}

View File

@ -38,6 +38,8 @@ public:
u8 size() const
{
if (decode_reg().type() == rsx::vertex_base_type::cmp)
return 4;
return decode_reg().size();
}