Fix Travis build and rename MVKPipelineLayout::getMaxTextureIndex() to getTextureCount().

This commit is contained in:
Bill Hollings 2018-10-31 13:28:42 -04:00
parent 403cedf0c8
commit a670412cf8
4 changed files with 17 additions and 5 deletions

View File

@ -14,6 +14,6 @@ cache:
- External - External
script: script:
- xcodebuild -scheme "MoltenVK Package (Release)" - xcodebuild -scheme "MoltenVK Package"
- xcodebuild -workspace Demos/Demos.xcworkspace -scheme "Cube-macOS" - xcodebuild -workspace Demos/Demos.xcworkspace -scheme "Cube-macOS"

View File

@ -75,7 +75,7 @@ public:
const MVKShaderAuxBufferBinding& getAuxBufferIndex() { return _auxBufferIndex; } const MVKShaderAuxBufferBinding& getAuxBufferIndex() { return _auxBufferIndex; }
/** Returns the number of textures in this layout. This is used to calculate the size of the auxiliary buffer. */ /** Returns the number of textures in this layout. This is used to calculate the size of the auxiliary buffer. */
uint32_t getMaxTextureIndex() { return _pushConstantsMTLResourceIndexes.getMaxTextureIndex(); } uint32_t getTextureCount() { return _pushConstantsMTLResourceIndexes.getMaxTextureIndex(); }
/** Constructs an instance for the specified device. */ /** Constructs an instance for the specified device. */
MVKPipelineLayout(MVKDevice* device, const VkPipelineLayoutCreateInfo* pCreateInfo); MVKPipelineLayout(MVKDevice* device, const VkPipelineLayoutCreateInfo* pCreateInfo);

View File

@ -306,7 +306,7 @@ MTLRenderPipelineDescriptor* MVKGraphicsPipeline::getMTLRenderPipelineDescriptor
initMVKShaderConverterContext(shaderContext, pCreateInfo); initMVKShaderConverterContext(shaderContext, pCreateInfo);
auto* mvkLayout = (MVKPipelineLayout*)pCreateInfo->layout; auto* mvkLayout = (MVKPipelineLayout*)pCreateInfo->layout;
_auxBufferIndex = mvkLayout->getAuxBufferIndex(); _auxBufferIndex = mvkLayout->getAuxBufferIndex();
uint32_t auxBufferSize = sizeof(uint32_t) * mvkLayout->getMaxTextureIndex(); uint32_t auxBufferSize = sizeof(uint32_t) * mvkLayout->getTextureCount();
// Retrieve the render subpass for which this pipeline is being constructed // Retrieve the render subpass for which this pipeline is being constructed
MVKRenderPass* mvkRendPass = (MVKRenderPass*)pCreateInfo->renderPass; MVKRenderPass* mvkRendPass = (MVKRenderPass*)pCreateInfo->renderPass;
@ -559,7 +559,7 @@ MVKMTLFunction MVKComputePipeline::getMTLFunction(const VkComputePipelineCreateI
MVKPipelineLayout* layout = (MVKPipelineLayout*)pCreateInfo->layout; MVKPipelineLayout* layout = (MVKPipelineLayout*)pCreateInfo->layout;
layout->populateShaderConverterContext(shaderContext); layout->populateShaderConverterContext(shaderContext);
_auxBufferIndex = layout->getAuxBufferIndex(); _auxBufferIndex = layout->getAuxBufferIndex();
uint32_t auxBufferSize = sizeof(uint32_t) * layout->getMaxTextureIndex(); uint32_t auxBufferSize = sizeof(uint32_t) * layout->getTextureCount();
shaderContext.options.auxBufferIndex = _auxBufferIndex.compute; shaderContext.options.auxBufferIndex = _auxBufferIndex.compute;
MVKShaderModule* mvkShdrMod = (MVKShaderModule*)pSS->module; MVKShaderModule* mvkShdrMod = (MVKShaderModule*)pSS->module;

View File

@ -189,6 +189,8 @@
A9D3560A20BB3A2900BE295C /* glslang_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = glslang_repo_revision; sourceTree = "<group>"; }; A9D3560A20BB3A2900BE295C /* glslang_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = glslang_repo_revision; sourceTree = "<group>"; };
A9D3560B20BB3A5600BE295C /* Vulkan-Headers_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Headers_repo_revision"; sourceTree = "<group>"; }; A9D3560B20BB3A5600BE295C /* Vulkan-Headers_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Headers_repo_revision"; sourceTree = "<group>"; };
A9D3560C20BB3A7200BE295C /* Vulkan-Tools_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Tools_repo_revision"; sourceTree = "<group>"; }; A9D3560C20BB3A7200BE295C /* Vulkan-Tools_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Tools_repo_revision"; sourceTree = "<group>"; };
A9DA8340218A198C002AA662 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = "<group>"; };
A9DA8341218A198C002AA662 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
A9EE46412065766C00193200 /* cereal_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = cereal_repo_revision; sourceTree = "<group>"; }; A9EE46412065766C00193200 /* cereal_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = cereal_repo_revision; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -198,9 +200,10 @@
children = ( children = (
A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */, A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */,
A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */, A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */,
A939A6FB1F5479D0006ACA0C /* External */,
A975D55B213F25AD00D4834F /* Scripts */, A975D55B213F25AD00D4834F /* Scripts */,
A92DB3E11CE0F34500FBC835 /* Docs */, A92DB3E11CE0F34500FBC835 /* Docs */,
A939A6FB1F5479D0006ACA0C /* External */, A9DA833F218A193F002AA662 /* Git */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -269,6 +272,15 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A9DA833F218A193F002AA662 /* Git */ = {
isa = PBXGroup;
children = (
A9DA8341218A198C002AA662 /* .gitignore */,
A9DA8340218A198C002AA662 /* .travis.yml */,
);
name = Git;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXProject section */ /* Begin PBXProject section */