Merge pull request #442 from billhollings/master

Fix for multiple image copy regions + Remove arm64e support for now.
This commit is contained in:
Bill Hollings 2019-01-04 17:58:23 -05:00 committed by GitHub
commit 61fc7564a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 12 deletions

View File

@ -3171,6 +3171,7 @@
A90FD89D21CC4EAB00B92BB2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -3187,6 +3188,7 @@
A90FD89E21CC4EAB00B92BB2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -3275,6 +3277,7 @@
A972A80D21CECBBF0013AB25 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -3295,6 +3298,7 @@
A972A80E21CECBBF0013AB25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -3347,6 +3351,7 @@
A972ABDA21CED7BC0013AB25 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
@ -3364,6 +3369,7 @@
A972ABDB21CED7BC0013AB25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";

View File

@ -1043,22 +1043,24 @@
A9B8EE1E1A98D796009C5A02 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Debug;
};
A9B8EE1F1A98D796009C5A02 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Release;
};

View File

@ -663,7 +663,7 @@ void MVKCmdBufferImageCopy::encode(MVKCommandEncoder* cmdEncoder) {
id<MTLTexture> mtlTexture = _image->getMTLTexture();
if ( !mtlBuffer || !mtlTexture ) { return; }
NSUInteger mtlBuffOffset = _buffer->getMTLBufferOffset();
NSUInteger mtlBuffOffsetBase = _buffer->getMTLBufferOffset();
MTLPixelFormat mtlPixFmt = _image->getMTLPixelFormat();
MVKCommandUse cmdUse = _toImage ? kMVKCommandUseCopyBufferToImage : kMVKCommandUseCopyImageToBuffer;
@ -671,6 +671,7 @@ void MVKCmdBufferImageCopy::encode(MVKCommandEncoder* cmdEncoder) {
MTLOrigin mtlTxtOrigin = mvkMTLOriginFromVkOffset3D(cpyRgn.imageOffset);
MTLSize mtlTxtSize = mvkMTLSizeFromVkExtent3D(cpyRgn.imageExtent);
NSUInteger mtlBuffOffset = mtlBuffOffsetBase + cpyRgn.bufferOffset;
uint32_t buffImgWd = cpyRgn.bufferRowLength;
if (buffImgWd == 0) { buffImgWd = cpyRgn.imageExtent.width; }
@ -725,7 +726,7 @@ void MVKCmdBufferImageCopy::encode(MVKCommandEncoder* cmdEncoder) {
id<MTLComputePipelineState> mtlComputeState = getCommandEncodingPool()->getCmdCopyBufferToImage3DDecompressMTLComputePipelineState(needsTempBuff);
[mtlComputeEnc pushDebugGroup: @"vkCmdCopyBufferToImage"];
[mtlComputeEnc setComputePipelineState: mtlComputeState];
[mtlComputeEnc setBuffer: mtlBuffer offset: mtlBuffOffset + cpyRgn.bufferOffset atIndex: 0];
[mtlComputeEnc setBuffer: mtlBuffer offset: mtlBuffOffset atIndex: 0];
MVKBuffer* tempBuff;
if (needsTempBuff) {
NSUInteger bytesPerDestRow = mvkMTLPixelFormatBytesPerRow(mtlTexture.pixelFormat, info.extent.width);
@ -772,11 +773,7 @@ void MVKCmdBufferImageCopy::encode(MVKCommandEncoder* cmdEncoder) {
[mtlComputeEnc popDebugGroup];
if (!needsTempBuff) { continue; }
} else {
mtlBuffOffset += cpyRgn.bufferOffset;
}
#else
mtlBuffOffset += cpyRgn.bufferOffset;
#endif
id<MTLBlitCommandEncoder> mtlBlitEnc = cmdEncoder->getMTLBlitEncoder(cmdUse);

View File

@ -508,6 +508,7 @@
A93747401A9A8B2900F29B34 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
CLANG_WARN_UNREACHABLE_CODE = NO;
@ -521,13 +522,14 @@
PRODUCT_NAME = MoltenVKGLSLToSPIRVConverter;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Debug;
};
A93747411A9A8B2900F29B34 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO;
CLANG_WARN_UNREACHABLE_CODE = NO;
@ -541,7 +543,7 @@
PRODUCT_NAME = MoltenVKGLSLToSPIRVConverter;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Release;
};
@ -580,6 +582,7 @@
A93903BD1C57E9D700FE90DC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -597,13 +600,14 @@
PRODUCT_NAME = MoltenVKSPIRVToMSLConverter;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Debug;
};
A93903BE1C57E9D700FE90DC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = arm64;
BITCODE_GENERATION_MODE = bitcode;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
@ -621,7 +625,7 @@
PRODUCT_NAME = MoltenVKSPIRVToMSLConverter;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64e";
VALID_ARCHS = arm64;
};
name = Release;
};