Merge pull request #539 from billhollings/master
Fix PVRTC texture content loading via memory mapping.
This commit is contained in:
commit
ccdfa67a7b
@ -505,28 +505,11 @@ This section documents the known limitations in this version of **MoltenVK**.
|
||||
In order to use Vulkan layers such as the validation layers, use the Vulkan loader and layers from the
|
||||
[LunarG Vulkan SDK](https://vulkan.lunarg.com).
|
||||
|
||||
The following *Vulkan 1.0* features have not been implemented in this version of **MoltenVK**:
|
||||
- `VkEvents` are not supported.
|
||||
|
||||
- Tessellation and Geometry shader stages.
|
||||
- Application-controlled memory allocations using `VkAllocationCallbacks` are ignored.
|
||||
|
||||
- Events:
|
||||
- `vkCreateEvent()`
|
||||
- `vkDestroyEvent()`
|
||||
- `vkGetEventStatus()`
|
||||
- `vkSetEvent()`
|
||||
- `vkResetEvent()`
|
||||
- `vkCmdSetEvent()`
|
||||
- `vkCmdResetEvent()`
|
||||
- `vkCmdWaitEvents()`
|
||||
|
||||
- Application-controlled memory allocations:
|
||||
- `VkAllocationCallbacks` are ignored
|
||||
|
||||
- Sparse memory:
|
||||
- `vkGetImageSparseMemoryRequirements()`
|
||||
- `vkGetPhysicalDeviceSparseImageFormatProperties()`
|
||||
- `vkQueueBindSparse()`
|
||||
|
||||
- Pipeline statistics query pool:
|
||||
- `vkCreateQueryPool(VK_QUERY_TYPE_PIPELINE_STATISTICS)`
|
||||
- Pipeline statistics query pool using `VK_QUERY_TYPE_PIPELINE_STATISTICS` is not supported.
|
||||
|
||||
- Image content in `PVRTC` compressed formats must be loaded directly into a `VkImage` using
|
||||
host-visible memory mapping. Loading via a staging buffer will result in malformed image content.
|
||||
|
@ -32,6 +32,7 @@ Released TBD
|
||||
- `fetchDependencies`: Stop on first error.
|
||||
- Fix a possible race condition around MVKMTLBufferAllocation.
|
||||
- Fix memory overrun if no vertex buffer found with same binding as a vertex attribute.
|
||||
- Fix PVRTC texture content loading via memory mapping.
|
||||
- Debug build mode includes `dSYM` file for each `dylib` file.
|
||||
- `Makefile` supports `install` target to install `MoltenVK.framework` into `/Library/Frameworks/`.
|
||||
- Update to latest SPIRV-Cross version:
|
||||
|
@ -2846,7 +2846,7 @@
|
||||
A9F55D25198BE6A7004EC31B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "The Brenwill Workshop Ltd.";
|
||||
TargetAttributes = {
|
||||
A972A7E421CEC72F0013AB25 = {
|
||||
@ -2863,10 +2863,11 @@
|
||||
};
|
||||
buildConfigurationList = A9F55D28198BE6A7004EC31B /* Build configuration list for PBXProject "ExternalDependencies" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = A9F55D24198BE6A7004EC31B;
|
||||
productRefGroup = A9F55D24198BE6A7004EC31B;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -782,7 +782,7 @@
|
||||
A9F55D25198BE6A7004EC31B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "The Brenwill Workshop Ltd.";
|
||||
TargetAttributes = {
|
||||
A9B8EE091A98D796009C5A02 = {
|
||||
@ -796,10 +796,11 @@
|
||||
};
|
||||
buildConfigurationList = A9F55D28198BE6A7004EC31B /* Build configuration list for PBXProject "MoltenVK" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = A9F55D24198BE6A7004EC31B;
|
||||
productRefGroup = A9F55D2E198BE6A7004EC31B /* Products */;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -486,12 +486,21 @@ void MVKImage::updateMTLTextureContent(MVKImageSubresource& subresource,
|
||||
}
|
||||
#endif
|
||||
|
||||
[getMTLTexture() replaceRegion: mtlRegion
|
||||
VkDeviceSize bytesPerRow = (imgType != VK_IMAGE_TYPE_1D) ? imgLayout.rowPitch : 0;
|
||||
VkDeviceSize bytesPerImage = (imgType == VK_IMAGE_TYPE_3D) ? imgLayout.depthPitch : 0;
|
||||
|
||||
id<MTLTexture> mtlTex = getMTLTexture();
|
||||
if (mvkMTLPixelFormatIsPVRTCFormat(mtlTex.pixelFormat)) {
|
||||
bytesPerRow = 0;
|
||||
bytesPerImage = 0;
|
||||
}
|
||||
|
||||
[mtlTex replaceRegion: mtlRegion
|
||||
mipmapLevel: imgSubRez.mipLevel
|
||||
slice: imgSubRez.arrayLayer
|
||||
withBytes: pImgBytes
|
||||
bytesPerRow: (imgType != VK_IMAGE_TYPE_1D ? imgLayout.rowPitch : 0)
|
||||
bytesPerImage: (imgType == VK_IMAGE_TYPE_3D ? imgLayout.depthPitch : 0)];
|
||||
bytesPerRow: bytesPerRow
|
||||
bytesPerImage: bytesPerImage];
|
||||
}
|
||||
|
||||
// Updates the contents of the underlying memory buffer from the contents of
|
||||
|
@ -248,7 +248,7 @@
|
||||
A90B2B1D1A9B6170008EE819 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
A9FEADBC1F3517480010240E = {
|
||||
DevelopmentTeam = VU3TCKU48B;
|
||||
@ -257,10 +257,11 @@
|
||||
};
|
||||
buildConfigurationList = A90B2B201A9B6170008EE819 /* Build configuration list for PBXProject "MoltenVKPackaging" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = A90B2B1C1A9B6170008EE819;
|
||||
projectDirPath = "";
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
|
@ -423,7 +423,7 @@
|
||||
A9F55D25198BE6A7004EC31B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1010;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "The Brenwill Workshop Ltd.";
|
||||
TargetAttributes = {
|
||||
A9092A8C1A81717B00051823 = {
|
||||
@ -448,10 +448,11 @@
|
||||
};
|
||||
buildConfigurationList = A9F55D28198BE6A7004EC31B /* Build configuration list for PBXProject "MoltenVKShaderConverter" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = A9F55D24198BE6A7004EC31B;
|
||||
productRefGroup = A9F55D24198BE6A7004EC31B;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
Loading…
x
Reference in New Issue
Block a user