fixed uint8 indextype
This commit is contained in:
@@ -81,9 +81,9 @@ const IndexType GPUDevice::ChooseIndexType(const VkDeviceSize &vertex_count)cons
|
||||
{
|
||||
if(vertex_count<=0)return(IndexType::ERR);
|
||||
|
||||
if(attr->uint8_index_type&& vertex_count<=0xFF )return IndexType::U8; else
|
||||
if( vertex_count<=0xFFFF)return IndexType::U16; else
|
||||
if(attr->physical_device->SupportU32Index() )return IndexType::U32; else
|
||||
if(attr->uint8_index_type&& vertex_count<=0xFF )return IndexType::U8; else
|
||||
if( vertex_count<=0xFFFF)return IndexType::U16; else
|
||||
if(attr->uint32_index_type )return IndexType::U32; else
|
||||
|
||||
return IndexType::ERR;
|
||||
}
|
||||
@@ -94,9 +94,9 @@ const bool GPUDevice::CheckIndexType(const IndexType it,const VkDeviceSize &vert
|
||||
|
||||
if(it==IndexType::U16&&vertex_count<=0xFFFF)return(true);
|
||||
|
||||
if(it==IndexType::U32&&attr->physical_device->SupportU32Index())return(true);
|
||||
if(it==IndexType::U32&& attr->uint32_index_type)return(true);
|
||||
|
||||
if(it==IndexType::U8 &&vertex_count<=0xFF&&attr->uint8_index_type)return(true);
|
||||
if(it==IndexType::U8 &&vertex_count<=0xFF&& attr->uint8_index_type)return(true);
|
||||
|
||||
return(false);
|
||||
}
|
||||
|
@@ -318,6 +318,12 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
|
||||
device_attr->uint8_index_type=true;
|
||||
}
|
||||
|
||||
if(physical_device->SupportU32Index()
|
||||
&&require.fullDrawIndexUint32>=VulkanHardwareRequirement::SupportLevel::Want)
|
||||
{
|
||||
device_attr->uint32_index_type=true;
|
||||
}
|
||||
|
||||
device_attr->surface_format=surface_format;
|
||||
|
||||
GetDeviceQueue(device_attr);
|
||||
|
Reference in New Issue
Block a user