fix crash from junk data
This commit is contained in:
@@ -40,6 +40,7 @@ gnReturnCode vulkanGetSurfaceCapabilities(gnPhysicalDevice device, gnSurface sur
|
||||
return vulkanCodeToGryphnCode(result);
|
||||
}
|
||||
gnReturnCode vulkanGetSurfaceFormats(gnPhysicalDevice device, gnSurface surface, uint32_t* formatCount, gnSurfaceFormat* formats) {
|
||||
*formatCount = 0;
|
||||
uint32_t internal_formatCout;
|
||||
gnReturnCode result = vulkanCodeToGryphnCode(vkGetPhysicalDeviceSurfaceFormatsKHR(device->internalData, surface, &internal_formatCout, NULL));
|
||||
if (result != GN_SUCCESS) {
|
||||
@@ -68,6 +69,7 @@ gnReturnCode vulkanGetSurfaceFormats(gnPhysicalDevice device, gnSurface surface,
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
gnReturnCode vulkanGetSurfacePresentModes(gnPhysicalDevice device, gnSurface surface, uint32_t* presentModeCount, gnPresentMode* presentModes) {
|
||||
*presentModeCount = 0;
|
||||
uint32_t internal_presentModeCount;
|
||||
gnReturnCode result = vulkanCodeToGryphnCode(vkGetPhysicalDeviceSurfacePresentModesKHR(device->internalData, surface, &internal_presentModeCount, NULL));
|
||||
if (result != GN_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user