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