Merge pull request #50 from billhollings/master

Fix push constant data copying and update to latest SPIRV-Cross.
This commit is contained in:
Bill Hollings 2018-02-14 14:31:23 -05:00 committed by GitHub
commit ddcb833da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 23 deletions

@ -1 +1 @@
Subproject commit 33c5cd9b19295f94702c8c3002283fb4b55f47ab
Subproject commit 6a0f6980ef851c3973f8e723737aa764b04b18ca

View File

@ -159,7 +159,7 @@ void MVKCmdPushConstants::setContent(VkPipelineLayout layout,
_stageFlags = stageFlags;
_offset = offset;
mvkEnsureSize(_pushConstants, size);
_pushConstants.resize(size);
copy_n((char*)pValues, size, _pushConstants.begin());
}

View File

@ -200,23 +200,12 @@ MVKImage* MVKCommandResourceFactory::newMVKImage(MVKImageDescriptorData& imgData
}
string MVKCommandResourceFactory::getFragFunctionSuffix(MTLPixelFormat mtlPixFmt) {
string suffix;
switch (mvkFormatTypeFromMTLPixelFormat(mtlPixFmt)) {
case kMVKFormatDepthStencil:
suffix = "DS";
break;
case kMVKFormatColorUInt:
suffix = "U";
break;
case kMVKFormatColorInt:
suffix = "I";
break;
default:
suffix = "F";
break;
case kMVKFormatDepthStencil: return "DS";
case kMVKFormatColorUInt: return "U";
case kMVKFormatColorInt: return "I";
default: return "F";
}
return suffix;
}
string MVKCommandResourceFactory::getFragFunctionSuffix(MVKRPSKeyClearAtt& attKey) {

View File

@ -74,19 +74,19 @@
</CommandLineArgument>
<CommandLineArgument
argument = "-gi"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/MoltenVK-bh/External/SPIRV-Cross/shaders-msl/comp/functions.comp"
isEnabled = "YES">
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/MoltenVK-bh/External/SPIRV-Cross/shaders-msl/vert/pointsize.vert"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-si"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/Support/Valve/Dota2/shader-issues/spv_cross_bug/spv_cross_bug.spv"
isEnabled = "NO">
argument = "/Users/bill/Documents/Dev/iOSProjects/Molten/Support/Valve/Dota2/shader-issues/sample_mask/sample_mask.spv"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-mo"