Merge pull request #3 from billhollings/master

Don't log error from vkGetPhysicalDeviceFormatProperties() if format not supported.
This commit is contained in:
Bill Hollings 2017-12-14 20:56:07 -05:00 committed by GitHub
commit 0abc41212e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 17 deletions

@ -1 +1 @@
Subproject commit adcda90d344346ef17cf8386c0ac63af828cf83f
Subproject commit bcc96d8c7011d5be504174ddbbadcacad227ea89

View File

@ -78,15 +78,15 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties* properties) {
#define MVK_FMT_NO_FEATS { 0, 0, 0 }
void MVKPhysicalDevice::getFormatProperties(VkFormat format,
VkFormatProperties* pFormatProperties) {
VkFormatProperties* pFormatProperties) {
if ( !pFormatProperties ) { return; }
*pFormatProperties = mvkVkFormatProperties(format);
#if MVK_MACOS
// Special-case certain formats that not all macOS GPU's support
MTLPixelFormat mtlPixFmt = mvkMTLPixelFormatFromVkFormat(format);
if (mtlPixFmt == MTLPixelFormatDepth24Unorm_Stencil8 &&
// Special-case certain formats that not all macOS GPU's support.
// Lookup from Metal to Vulkan to avoid logging error message when going the other way.
if (format == mvkVkFormatFromMTLPixelFormat(MTLPixelFormatDepth24Unorm_Stencil8) &&
!getMTLDevice().isDepth24Stencil8PixelFormatSupported) {
*pFormatProperties = MVK_FMT_NO_FEATS;
}

View File

@ -77,11 +77,11 @@ MVK_PUBLIC_SYMBOL void vkGetVersionStringsMVK(
size_t len;
string mvkVer;
mvkVer += to_string((MVK_VERSION >> 24) & 0xFF);
mvkVer += to_string(MVK_VERSION / 10000);
mvkVer += ".";
mvkVer += to_string((MVK_VERSION >> 16) & 0xFF);
mvkVer += to_string((MVK_VERSION % 10000) / 100);
mvkVer += ".";
mvkVer += to_string((MVK_VERSION >> 8) & 0xFF);
mvkVer += to_string(MVK_VERSION % 100);
len = mvkVer.copy(pMoltenVersionStringBuffer, moltenVersionStringBufferLength - 1);
pMoltenVersionStringBuffer[len] = 0; // terminator

View File

@ -74,19 +74,19 @@
</CommandLineArgument>
<CommandLineArgument
argument = "-gi"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/MoltenVK/External/SPIRV-Cross/shaders-msl/comp/struct-packing.comp"
isEnabled = "YES">
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/MoltenVK/External/SPIRV-Cross/shaders-msl/vert/forum_test.vert"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-si"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/MoltenVK/External/SPIRV-Cross/shaders-msl/frag.spv"
isEnabled = "NO">
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/functions_nested-opt.spv"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-mo"

View File

@ -91,7 +91,7 @@ If you make changes to the `SPIRV-Cross` submodule, you can regression test your
4. Run the regression tests:
./test_shaders.py --msl shaders-msl
./test_shaders.sh
5. If your changes result in different expected output for a reference shader, you can update
the reference shader for a particular regression test: