vkCmdClearImage() set error if attempt made to clear 1D image.

VkPhysicalDevicePortabilitySubsetFeaturesEXTX::events set to true.
This commit is contained in:
Bill Hollings 2019-08-09 23:10:04 -04:00
parent 0fc3036983
commit 607941ebd7
3 changed files with 7 additions and 1 deletions

View File

@ -25,11 +25,14 @@ Released TBD
- Ensure Vulkan loader magic number is set every time before returning any dispatchable Vulkan handle.
- Fix crash when `VkDeviceCreateInfo` specifies queue families out of numerical order.
- Fix crash in `vkDestroyPipelineLayout()`.
- `vkCmdClearImage()` set error if attempt made to clear 1D image.
- Remove error logging on `VK_TIMEOUT` of `VkSemaphore` and `VkFence`.
- Consolidate the various linkable objects into a `MVKLinkableMixin` template base class.
- Use `MVKVector` whenever possible in MoltenVK, especially within render loop.
- No longer prefer dedicated allocations for buffer memory, including buffer-backed images.
- Handle the `compositeAlpha` member of `VkSwapchainCreateInfoKHR`.
- `VkPhysicalDevicePortabilitySubsetFeaturesEXTX::events` set to `true`.
MoltenVK 1.0.36

View File

@ -1055,6 +1055,9 @@ void MVKCmdClearImage::setContent(VkImage image,
}
// Validate
if (_image->getImageType() == VK_IMAGE_TYPE_1D) {
setConfigurationResult(reportError(VK_ERROR_FEATURE_NOT_PRESENT, "vkCmdClearImage(): 1D images cannot be cleared on this device."));
}
if ( !_image->getSupportsAllFormatFeatures(VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) ) {
setConfigurationResult(reportError(VK_ERROR_FEATURE_NOT_PRESENT, "vkCmdClearImage(): Format %s cannot be cleared on this device.", mvkVkFormatName(_image->getVkFormat())));
}

View File

@ -128,7 +128,7 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) {
auto* portabilityFeatures = (VkPhysicalDevicePortabilitySubsetFeaturesEXTX*)next;
portabilityFeatures->triangleFans = false;
portabilityFeatures->separateStencilMaskRef = true;
portabilityFeatures->events = _metalFeatures.events;
portabilityFeatures->events = true;
portabilityFeatures->standardImageViews = _mvkInstance->getMoltenVKConfiguration()->fullImageViewSwizzle;
portabilityFeatures->samplerMipLodBias = false;
break;