From a670412cf8fa105d9d851638ed68edd2ac977cc7 Mon Sep 17 00:00:00 2001 From: Bill Hollings Date: Wed, 31 Oct 2018 13:28:42 -0400 Subject: [PATCH] Fix Travis build and rename MVKPipelineLayout::getMaxTextureIndex() to getTextureCount(). --- .travis.yml | 2 +- MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h | 2 +- MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm | 4 ++-- MoltenVKPackaging.xcodeproj/project.pbxproj | 14 +++++++++++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c033ef1d..33c45434 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,6 @@ cache: - External script: - - xcodebuild -scheme "MoltenVK Package (Release)" + - xcodebuild -scheme "MoltenVK Package" - xcodebuild -workspace Demos/Demos.xcworkspace -scheme "Cube-macOS" diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h index b92ee5ba..3e3f2466 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.h @@ -75,7 +75,7 @@ public: const MVKShaderAuxBufferBinding& getAuxBufferIndex() { return _auxBufferIndex; } /** 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. */ MVKPipelineLayout(MVKDevice* device, const VkPipelineLayoutCreateInfo* pCreateInfo); diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm index 3d00f659..0c38b3ba 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm @@ -306,7 +306,7 @@ MTLRenderPipelineDescriptor* MVKGraphicsPipeline::getMTLRenderPipelineDescriptor initMVKShaderConverterContext(shaderContext, pCreateInfo); auto* mvkLayout = (MVKPipelineLayout*)pCreateInfo->layout; _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 MVKRenderPass* mvkRendPass = (MVKRenderPass*)pCreateInfo->renderPass; @@ -559,7 +559,7 @@ MVKMTLFunction MVKComputePipeline::getMTLFunction(const VkComputePipelineCreateI MVKPipelineLayout* layout = (MVKPipelineLayout*)pCreateInfo->layout; layout->populateShaderConverterContext(shaderContext); _auxBufferIndex = layout->getAuxBufferIndex(); - uint32_t auxBufferSize = sizeof(uint32_t) * layout->getMaxTextureIndex(); + uint32_t auxBufferSize = sizeof(uint32_t) * layout->getTextureCount(); shaderContext.options.auxBufferIndex = _auxBufferIndex.compute; MVKShaderModule* mvkShdrMod = (MVKShaderModule*)pSS->module; diff --git a/MoltenVKPackaging.xcodeproj/project.pbxproj b/MoltenVKPackaging.xcodeproj/project.pbxproj index d8f871b4..65e8fd61 100644 --- a/MoltenVKPackaging.xcodeproj/project.pbxproj +++ b/MoltenVKPackaging.xcodeproj/project.pbxproj @@ -189,6 +189,8 @@ A9D3560A20BB3A2900BE295C /* glslang_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = glslang_repo_revision; sourceTree = ""; }; A9D3560B20BB3A5600BE295C /* Vulkan-Headers_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Headers_repo_revision"; sourceTree = ""; }; A9D3560C20BB3A7200BE295C /* Vulkan-Tools_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Vulkan-Tools_repo_revision"; sourceTree = ""; }; + A9DA8340218A198C002AA662 /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = ""; }; + A9DA8341218A198C002AA662 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; A9EE46412065766C00193200 /* cereal_repo_revision */ = {isa = PBXFileReference; lastKnownFileType = text; path = cereal_repo_revision; sourceTree = ""; }; /* End PBXFileReference section */ @@ -198,9 +200,10 @@ children = ( A92DB3EE1CE0F72500FBC835 /* MoltenVK.xcodeproj */, A92DB40E1CE0F89600FBC835 /* MoltenVKShaderConverter.xcodeproj */, + A939A6FB1F5479D0006ACA0C /* External */, A975D55B213F25AD00D4834F /* Scripts */, A92DB3E11CE0F34500FBC835 /* Docs */, - A939A6FB1F5479D0006ACA0C /* External */, + A9DA833F218A193F002AA662 /* Git */, ); sourceTree = ""; }; @@ -269,6 +272,15 @@ name = Products; sourceTree = ""; }; + A9DA833F218A193F002AA662 /* Git */ = { + isa = PBXGroup; + children = ( + A9DA8341218A198C002AA662 /* .gitignore */, + A9DA8340218A198C002AA662 /* .travis.yml */, + ); + name = Git; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXProject section */