Merge pull request #137 from billhollings/master
Update to latest LunarG/VulkanSamples and update MoltenVK version to …
This commit is contained in:
commit
58481a7a2d
@ -1 +1 @@
|
||||
2c05813aff7161f04250673e690e6c130cfae2d7
|
||||
4d56b6cb5ce0682bd3ade4bb20791c7bc16c3ce8
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
||||
*/
|
||||
#define MVK_VERSION_MAJOR 1
|
||||
#define MVK_VERSION_MINOR 0
|
||||
#define MVK_VERSION_PATCH 2
|
||||
#define MVK_VERSION_PATCH 3
|
||||
|
||||
#define MVK_MAKE_VERSION(major, minor, patch) (((major) * 10000) + ((minor) * 100) + (patch))
|
||||
#define MVK_VERSION MVK_MAKE_VERSION(MVK_VERSION_MAJOR, MVK_VERSION_MINOR, MVK_VERSION_PATCH)
|
||||
|
@ -229,12 +229,16 @@ VkResult MVKPhysicalDevice::getSurfacePresentModes(MVKSurface* surface,
|
||||
CAMetalLayer* mtlLayer = surface->getCAMetalLayer();
|
||||
if ( !mtlLayer ) { return surface->getConfigurationResult(); }
|
||||
|
||||
// TODO: check which mode(s) are applicable to Metal
|
||||
const VkPresentModeKHR presentModes[] = {
|
||||
// VK_PRESENT_MODE_MAILBOX_KHR,
|
||||
VK_PRESENT_MODE_FIFO_KHR,
|
||||
};
|
||||
const uint presentModesCnt = sizeof(presentModes) / sizeof(VkPresentModeKHR);
|
||||
vector<VkPresentModeKHR> presentModes;
|
||||
presentModes.push_back(VK_PRESENT_MODE_FIFO_KHR);
|
||||
|
||||
#if MVK_MACOS
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v3] ) {
|
||||
presentModes.push_back(VK_PRESENT_MODE_IMMEDIATE_KHR);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t presentModesCnt = uint32_t(presentModes.size());
|
||||
|
||||
// If properties aren't actually being requested yet, simply update the returned count
|
||||
if ( !pPresentModes ) {
|
||||
@ -947,9 +951,9 @@ void MVKPhysicalDevice::logGPUInfo() {
|
||||
#endif
|
||||
|
||||
#if MVK_MACOS
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v3] ) { fsMsg += "\n\t\tOSX GPU Family 1 v3"; }
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v2] ) { fsMsg += "\n\t\tOSX GPU Family 1 v2"; }
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v1] ) { fsMsg += "\n\t\tOSX GPU Family 1 v1"; }
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v3] ) { fsMsg += "\n\t\tmacOS GPU Family 1 v3"; }
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v2] ) { fsMsg += "\n\t\tmacOS GPU Family 1 v2"; }
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_macOS_GPUFamily1_v1] ) { fsMsg += "\n\t\tmacOS GPU Family 1 v1"; }
|
||||
#endif
|
||||
|
||||
MVKLogInfo(fsMsg.c_str(), _properties.deviceName, devTypeStr.c_str(), _properties.vendorID, _properties.deviceID,
|
||||
|
@ -189,9 +189,15 @@ MVKSwapchain::MVKSwapchain(MVKDevice* device,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT |
|
||||
VK_IMAGE_USAGE_STORAGE_BIT));
|
||||
#if MVK_MACOS
|
||||
if ( pCreateInfo->presentMode == VK_PRESENT_MODE_IMMEDIATE_KHR) {
|
||||
_mtlLayer.displaySyncEnabled = NO;
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: set additional CAMetalLayer properties before extracting drawables:
|
||||
// - presentsWithTransaction
|
||||
// - maximumDrawableCount (maybe for MAILBOX?)
|
||||
// - drawsAsynchronously
|
||||
// - colorspace (macOS only) Vulkan only supports sRGB colorspace for now.
|
||||
// - wantsExtendedDynamicRangeContent (macOS only)
|
||||
|
@ -113,7 +113,7 @@ update_repo ${REPO_NAME} ${REPO_URL} ${REPO_REV}
|
||||
# ----------------- VulkanSamples -------------------
|
||||
|
||||
REPO_NAME=VulkanSamples
|
||||
REPO_URL="https://github.com/brenwill/${REPO_NAME}.git"
|
||||
REPO_URL="https://github.com/LunarG/${REPO_NAME}.git"
|
||||
REPO_REV=$(cat "../${EXT_REV_DIR}/${REPO_NAME}_repo_revision")
|
||||
|
||||
update_repo ${REPO_NAME} ${REPO_URL} ${REPO_REV}
|
||||
|
Loading…
x
Reference in New Issue
Block a user