From babddbcf14af8401381687c75e4bfe1cd2689d4b Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Sat, 7 Nov 2020 12:06:29 -0500 Subject: dev-util/spirv-tools: Update snapshot Closes: https://bugs.gentoo.org/753479 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Nick Sarnie --- dev-util/spirv-tools/Manifest | 2 +- .../files/spirv-tools-2020.5-Fix-build.patch | 373 --------------------- .../spirv-tools-2020.5_pre20200922.ebuild | 46 --- .../spirv-tools-2020.5_pre20201107.ebuild | 44 +++ dev-util/spirv-tools/spirv-tools-9999.ebuild | 11 +- 5 files changed, 52 insertions(+), 424 deletions(-) delete mode 100644 dev-util/spirv-tools/files/spirv-tools-2020.5-Fix-build.patch delete mode 100644 dev-util/spirv-tools/spirv-tools-2020.5_pre20200922.ebuild create mode 100644 dev-util/spirv-tools/spirv-tools-2020.5_pre20201107.ebuild (limited to 'dev-util') diff --git a/dev-util/spirv-tools/Manifest b/dev-util/spirv-tools/Manifest index 863f9b776223..5cc21ac225cf 100644 --- a/dev-util/spirv-tools/Manifest +++ b/dev-util/spirv-tools/Manifest @@ -1,2 +1,2 @@ DIST spirv-tools-2020.3.tar.gz 2170858 BLAKE2B c9fdc6bbf6edbb6e3e5aba1fff9bd179b7b435ecb4ebbe29db38ce0c71166269484f8c3798a69a0fe5d936392b07fc6ccd5f058945aa70330612a6ef8fafe12f SHA512 8abb4fe227dbe9d0fc4279523eb714ce3a590a3c56e3dcd226317bc7835e2dceaef3a46c0873c2f144c61b28f41c0fcdf2985cc4f708fa496186c16738cc493f -DIST spirv-tools-2020.5_pre20200922.tar.gz 2474733 BLAKE2B 394a5ab22f038c1742325840e9e1c9c955c8646178f545767df34376ad8ba456febbc8303d725b785d2aba93d4a33b87ba49eb04ab6827c0ba9b608972d2194c SHA512 a03fba68e760a2a3c3c664071f071556b6fcc00a4cc30b67fdfa12a92833cec6078f84f3c116f9236e7e2004ca3c4633b2fccc3795b06cb51f81a92eaa2734e5 +DIST spirv-tools-2020.5_pre20201107.tar.gz 2583541 BLAKE2B f234e34142af47a98268d85fa12861b9c66c78d74af7e44d4aa9150ad5cfce8e65780d89344ec947b4866de9811a8198e174480c23c30f690193feca7cc136a6 SHA512 a65174e5f1b7cad3be80e0df0d46e8fbfbb62f397fe98eb1b2c37bb85cf8f92d7b4c9103b5e9e8181240bcf97e5a7e3f09323f78159d4b25f7f02176e982f542 diff --git a/dev-util/spirv-tools/files/spirv-tools-2020.5-Fix-build.patch b/dev-util/spirv-tools/files/spirv-tools-2020.5-Fix-build.patch deleted file mode 100644 index 4c6a4e4df717..000000000000 --- a/dev-util/spirv-tools/files/spirv-tools-2020.5-Fix-build.patch +++ /dev/null @@ -1,373 +0,0 @@ -From a1d38174b1f7d2651c718ae661886d606cb50a32 Mon Sep 17 00:00:00 2001 -From: Tobski -Date: Tue, 20 Oct 2020 13:00:13 +0100 -Subject: [PATCH] Support SPV_KHR_fragment_shading_rate (#3943) - ---- - include/spirv-tools/libspirv.h | 13 +-- - source/operand.cpp | 3 + - source/val/validate_builtins.cpp | 159 +++++++++++++++++++++++++++++++ - test/val/val_builtins_test.cpp | 104 ++++++++++++++++++++ - 4 files changed, 273 insertions(+), 6 deletions(-) - -diff --git a/include/spirv-tools/libspirv.h b/include/spirv-tools/libspirv.h -index 16ea7ffac5..a0114c3f4b 100644 ---- a/include/spirv-tools/libspirv.h -+++ b/include/spirv-tools/libspirv.h -@@ -176,12 +176,13 @@ typedef enum spv_operand_type_t { - - // Set 5: Operands that are a single word bitmask. - // Sometimes a set bit indicates the instruction requires still more operands. -- SPV_OPERAND_TYPE_IMAGE, // SPIR-V Sec 3.14 -- SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, // SPIR-V Sec 3.15 -- SPV_OPERAND_TYPE_SELECTION_CONTROL, // SPIR-V Sec 3.22 -- SPV_OPERAND_TYPE_LOOP_CONTROL, // SPIR-V Sec 3.23 -- SPV_OPERAND_TYPE_FUNCTION_CONTROL, // SPIR-V Sec 3.24 -- SPV_OPERAND_TYPE_MEMORY_ACCESS, // SPIR-V Sec 3.26 -+ SPV_OPERAND_TYPE_IMAGE, // SPIR-V Sec 3.14 -+ SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, // SPIR-V Sec 3.15 -+ SPV_OPERAND_TYPE_SELECTION_CONTROL, // SPIR-V Sec 3.22 -+ SPV_OPERAND_TYPE_LOOP_CONTROL, // SPIR-V Sec 3.23 -+ SPV_OPERAND_TYPE_FUNCTION_CONTROL, // SPIR-V Sec 3.24 -+ SPV_OPERAND_TYPE_MEMORY_ACCESS, // SPIR-V Sec 3.26 -+ SPV_OPERAND_TYPE_FRAGMENT_SHADING_RATE, // SPIR-V Sec 3.FSR - - // The remaining operand types are only used internally by the assembler. - // There are two categories: -diff --git a/source/operand.cpp b/source/operand.cpp -index 7b2b98f2d1..d4b64a8b82 100644 ---- a/source/operand.cpp -+++ b/source/operand.cpp -@@ -208,6 +208,8 @@ const char* spvOperandTypeStr(spv_operand_type_t type) { - case SPV_OPERAND_TYPE_MEMORY_ACCESS: - case SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS: - return "memory access"; -+ case SPV_OPERAND_TYPE_FRAGMENT_SHADING_RATE: -+ return "shading rate"; - case SPV_OPERAND_TYPE_SCOPE_ID: - return "scope ID"; - case SPV_OPERAND_TYPE_GROUP_OPERATION: -@@ -360,6 +362,7 @@ bool spvOperandIsConcreteMask(spv_operand_type_t type) { - case SPV_OPERAND_TYPE_LOOP_CONTROL: - case SPV_OPERAND_TYPE_FUNCTION_CONTROL: - case SPV_OPERAND_TYPE_MEMORY_ACCESS: -+ case SPV_OPERAND_TYPE_FRAGMENT_SHADING_RATE: - case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: - case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: - return true; -diff --git a/source/val/validate_builtins.cpp b/source/val/validate_builtins.cpp -index 1d7017d118..5b9eed6407 100644 ---- a/source/val/validate_builtins.cpp -+++ b/source/val/validate_builtins.cpp -@@ -1,4 +1,6 @@ - // Copyright (c) 2018 Google LLC. -+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights -+// reserved. - // - // Licensed under the Apache License, Version 2.0 (the "License"); - // you may not use this file except in compliance with the License. -@@ -230,6 +232,12 @@ class BuiltInsValidator { - spv_result_t ValidateComputeI32InputAtDefinition(const Decoration& decoration, - const Instruction& inst); - -+ spv_result_t ValidatePrimitiveShadingRateAtDefinition( -+ const Decoration& decoration, const Instruction& inst); -+ -+ spv_result_t ValidateShadingRateAtDefinition(const Decoration& decoration, -+ const Instruction& inst); -+ - // The following section contains functions which are called when id defined - // by |referenced_inst| is - // 1. referenced by |referenced_from_inst| -@@ -383,6 +391,16 @@ class BuiltInsValidator { - const Instruction& referenced_inst, - const Instruction& referenced_from_inst); - -+ spv_result_t ValidatePrimitiveShadingRateAtReference( -+ const Decoration& decoration, const Instruction& built_in_inst, -+ const Instruction& referenced_inst, -+ const Instruction& referenced_from_inst); -+ -+ spv_result_t ValidateShadingRateAtReference( -+ const Decoration& decoration, const Instruction& built_in_inst, -+ const Instruction& referenced_inst, -+ const Instruction& referenced_from_inst); -+ - // Validates that |built_in_inst| is not (even indirectly) referenced from - // within a function which can be called with |execution_model|. - // -@@ -3314,6 +3332,142 @@ spv_result_t BuiltInsValidator::ValidateSMBuiltinsAtReference( - return SPV_SUCCESS; - } - -+spv_result_t BuiltInsValidator::ValidatePrimitiveShadingRateAtDefinition( -+ const Decoration& decoration, const Instruction& inst) { -+ if (spvIsVulkanEnv(_.context()->target_env)) { -+ if (spv_result_t error = ValidateI32( -+ decoration, inst, -+ [this, &inst, -+ &decoration](const std::string& message) -> spv_result_t { -+ return _.diag(SPV_ERROR_INVALID_DATA, &inst) -+ << _.VkErrorID(4486) -+ << "According to the Vulkan spec BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " variable needs to be a 32-bit int scalar. " -+ << message; -+ })) { -+ return error; -+ } -+ } -+ -+ // Seed at reference checks with this built-in. -+ return ValidatePrimitiveShadingRateAtReference(decoration, inst, inst, inst); -+} -+ -+spv_result_t BuiltInsValidator::ValidatePrimitiveShadingRateAtReference( -+ const Decoration& decoration, const Instruction& built_in_inst, -+ const Instruction& referenced_inst, -+ const Instruction& referenced_from_inst) { -+ if (spvIsVulkanEnv(_.context()->target_env)) { -+ const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); -+ if (storage_class != SpvStorageClassMax && -+ storage_class != SpvStorageClassOutput) { -+ return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) -+ << _.VkErrorID(4485) << "Vulkan spec allows BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " to be only used for variables with Output storage class. " -+ << GetReferenceDesc(decoration, built_in_inst, referenced_inst, -+ referenced_from_inst) -+ << " " << GetStorageClassDesc(referenced_from_inst); -+ } -+ -+ for (const SpvExecutionModel execution_model : execution_models_) { -+ switch (execution_model) { -+ case SpvExecutionModelVertex: -+ case SpvExecutionModelGeometry: -+ case SpvExecutionModelMeshNV: -+ break; -+ default: { -+ return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) -+ << _.VkErrorID(4484) << "Vulkan spec allows BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " to be used only with Vertex, Geometry, or MeshNV " -+ "execution models. " -+ << GetReferenceDesc(decoration, built_in_inst, referenced_inst, -+ referenced_from_inst, execution_model); -+ } -+ } -+ } -+ } -+ -+ if (function_id_ == 0) { -+ // Propagate this rule to all dependant ids in the global scope. -+ id_to_at_reference_checks_[referenced_from_inst.id()].push_back( -+ std::bind(&BuiltInsValidator::ValidatePrimitiveShadingRateAtReference, -+ this, decoration, built_in_inst, referenced_from_inst, -+ std::placeholders::_1)); -+ } -+ -+ return SPV_SUCCESS; -+} -+ -+spv_result_t BuiltInsValidator::ValidateShadingRateAtDefinition( -+ const Decoration& decoration, const Instruction& inst) { -+ if (spvIsVulkanEnv(_.context()->target_env)) { -+ if (spv_result_t error = ValidateI32( -+ decoration, inst, -+ [this, &inst, -+ &decoration](const std::string& message) -> spv_result_t { -+ return _.diag(SPV_ERROR_INVALID_DATA, &inst) -+ << _.VkErrorID(4492) -+ << "According to the Vulkan spec BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " variable needs to be a 32-bit int scalar. " -+ << message; -+ })) { -+ return error; -+ } -+ } -+ -+ // Seed at reference checks with this built-in. -+ return ValidateShadingRateAtReference(decoration, inst, inst, inst); -+} -+ -+spv_result_t BuiltInsValidator::ValidateShadingRateAtReference( -+ const Decoration& decoration, const Instruction& built_in_inst, -+ const Instruction& referenced_inst, -+ const Instruction& referenced_from_inst) { -+ if (spvIsVulkanEnv(_.context()->target_env)) { -+ const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); -+ if (storage_class != SpvStorageClassMax && -+ storage_class != SpvStorageClassInput) { -+ return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) -+ << _.VkErrorID(4491) << "Vulkan spec allows BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " to be only used for variables with Input storage class. " -+ << GetReferenceDesc(decoration, built_in_inst, referenced_inst, -+ referenced_from_inst) -+ << " " << GetStorageClassDesc(referenced_from_inst); -+ } -+ -+ for (const SpvExecutionModel execution_model : execution_models_) { -+ if (execution_model != SpvExecutionModelFragment) { -+ return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) -+ << _.VkErrorID(4490) << "Vulkan spec allows BuiltIn " -+ << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, -+ decoration.params()[0]) -+ << " to be used only with the Fragment execution model. " -+ << GetReferenceDesc(decoration, built_in_inst, referenced_inst, -+ referenced_from_inst, execution_model); -+ } -+ } -+ } -+ -+ if (function_id_ == 0) { -+ // Propagate this rule to all dependant ids in the global scope. -+ id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( -+ &BuiltInsValidator::ValidateShadingRateAtReference, this, decoration, -+ built_in_inst, referenced_from_inst, std::placeholders::_1)); -+ } -+ -+ return SPV_SUCCESS; -+} -+ - spv_result_t BuiltInsValidator::ValidateSingleBuiltInAtDefinition( - const Decoration& decoration, const Instruction& inst) { - const SpvBuiltIn label = SpvBuiltIn(decoration.params()[0]); -@@ -3514,6 +3668,11 @@ spv_result_t BuiltInsValidator::ValidateSingleBuiltInAtDefinition( - case SpvBuiltInRayGeometryIndexKHR: { - // No validation rules (for the moment). - break; -+ -+ case SpvBuiltInPrimitiveShadingRateKHR: -+ return ValidatePrimitiveShadingRateAtDefinition(decoration, inst); -+ case SpvBuiltInShadingRateKHR: -+ return ValidateShadingRateAtDefinition(decoration, inst); - } - } - return SPV_SUCCESS; -diff --git a/test/val/val_builtins_test.cpp b/test/val/val_builtins_test.cpp -index cc9bda67cf..4248caa9b1 100644 ---- a/test/val/val_builtins_test.cpp -+++ b/test/val/val_builtins_test.cpp -@@ -1,4 +1,6 @@ - // Copyright (c) 2018 Google LLC. -+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights -+// reserved. - // - // Licensed under the Apache License, Version 2.0 (the "License"); - // you may not use this file except in compliance with the License. -@@ -3723,6 +3725,108 @@ OpDecorate %int0 BuiltIn Position - EXPECT_EQ(SPV_SUCCESS, ValidateInstructions()); - } - -+INSTANTIATE_TEST_SUITE_P( -+ PrimitiveShadingRateOutputSuccess, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine(Values("PrimitiveShadingRateKHR"), Values("Vertex", "Geometry"), -+ Values("Output"), Values("%u32"), -+ Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values(nullptr), Values(TestResult()))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ PrimitiveShadingRateMeshOutputSuccess, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine(Values("PrimitiveShadingRateKHR"), Values("MeshNV"), -+ Values("Output"), Values("%u32"), -+ Values("OpCapability FragmentShadingRateKHR\nOpCapability " -+ "MeshShadingNV\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\nOpExtension " -+ "\"SPV_NV_mesh_shader\"\n"), -+ Values(nullptr), Values(TestResult()))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ PrimitiveShadingRateInvalidExecutionModel, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine( -+ Values("PrimitiveShadingRateKHR"), Values("Fragment"), Values("Output"), -+ Values("%u32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04484 "), -+ Values(TestResult( -+ SPV_ERROR_INVALID_DATA, -+ "Vulkan spec allows BuiltIn PrimitiveShadingRateKHR to be used " -+ "only with Vertex, Geometry, or MeshNV execution models.")))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ PrimitiveShadingRateInvalidStorageClass, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine( -+ Values("PrimitiveShadingRateKHR"), Values("Vertex"), Values("Input"), -+ Values("%u32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04485 "), -+ Values(TestResult( -+ SPV_ERROR_INVALID_DATA, -+ "Vulkan spec allows BuiltIn PrimitiveShadingRateKHR to be only " -+ "used for variables with Output storage class.")))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ PrimitiveShadingRateInvalidType, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine( -+ Values("PrimitiveShadingRateKHR"), Values("Vertex"), Values("Output"), -+ Values("%f32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-PrimitiveShadingRateKHR-PrimitiveShadingRateKHR-04485 "), -+ Values(TestResult( -+ SPV_ERROR_INVALID_DATA, -+ "According to the Vulkan spec BuiltIn PrimitiveShadingRateKHR " -+ "variable needs to be a 32-bit int scalar.")))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ ShadingRateInputSuccess, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine(Values("ShadingRateKHR"), Values("Fragment"), Values("Input"), -+ Values("%u32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values(nullptr), Values(TestResult()))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ ShadingRateInvalidExecutionModel, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine(Values("ShadingRateKHR"), Values("Vertex"), Values("Input"), -+ Values("%u32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-ShadingRateKHR-ShadingRateKHR-04490 "), -+ Values(TestResult( -+ SPV_ERROR_INVALID_DATA, -+ "Vulkan spec allows BuiltIn ShadingRateKHR to be used " -+ "only with the Fragment execution model.")))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ ShadingRateInvalidStorageClass, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine(Values("ShadingRateKHR"), Values("Fragment"), Values("Output"), -+ Values("%u32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-ShadingRateKHR-ShadingRateKHR-04491 "), -+ Values(TestResult( -+ SPV_ERROR_INVALID_DATA, -+ "Vulkan spec allows BuiltIn ShadingRateKHR to be only " -+ "used for variables with Input storage class.")))); -+ -+INSTANTIATE_TEST_SUITE_P( -+ ShadingRateInvalidType, -+ ValidateVulkanCombineBuiltInExecutionModelDataTypeCapabilityExtensionResult, -+ Combine( -+ Values("ShadingRateKHR"), Values("Fragment"), Values("Input"), -+ Values("%f32"), Values("OpCapability FragmentShadingRateKHR\n"), -+ Values("OpExtension \"SPV_KHR_fragment_shading_rate\"\n"), -+ Values("VUID-ShadingRateKHR-ShadingRateKHR-04492 "), -+ Values(TestResult(SPV_ERROR_INVALID_DATA, -+ "According to the Vulkan spec BuiltIn ShadingRateKHR " -+ "variable needs to be a 32-bit int scalar.")))); - } // namespace - } // namespace val - } // namespace spvtools diff --git a/dev-util/spirv-tools/spirv-tools-2020.5_pre20200922.ebuild b/dev-util/spirv-tools/spirv-tools-2020.5_pre20200922.ebuild deleted file mode 100644 index 1162148e7666..000000000000 --- a/dev-util/spirv-tools/spirv-tools-2020.5_pre20200922.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MY_PN=SPIRV-Tools -CMAKE_ECLASS="cmake" -PYTHON_COMPAT=( python3_{6,7,8} ) -inherit cmake-multilib python-any-r1 - -if [[ ${PV} == *9999* ]]; then - EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git" - inherit git-r3 -else - EGIT_COMMIT="0a1fb588cd365f7737cb121fdd64553923e0cef6" - SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - S="${WORKDIR}"/${MY_PN}-${EGIT_COMMIT} -fi - -DESCRIPTION="Provides an API and commands for processing SPIR-V modules" -HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Tools" - -LICENSE="Apache-2.0" -SLOT="0" -# Tests fail upon finding symbols that do not match a regular expression -# in the generated library. Easily hit with non-standard compiler flags -RESTRICT="test" -COMMON_DEPEND=">=dev-util/spirv-headers-1.5.4" -DEPEND="${COMMON_DEPEND}" -RDEPEND="" -BDEPEND="${PYTHON_DEPS} - ${COMMON_DEPEND}" - -PATCHES=( - "${FILESDIR}"/"${PN}"-2020.5-Fix-build.patch -) - -multilib_src_configure() { - local mycmakeargs=( - "-DSPIRV-Headers_SOURCE_DIR=/usr/" - "-DSPIRV_WERROR=OFF" - ) - - cmake_src_configure -} diff --git a/dev-util/spirv-tools/spirv-tools-2020.5_pre20201107.ebuild b/dev-util/spirv-tools/spirv-tools-2020.5_pre20201107.ebuild new file mode 100644 index 000000000000..d1cdb00c129a --- /dev/null +++ b/dev-util/spirv-tools/spirv-tools-2020.5_pre20201107.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN=SPIRV-Tools +CMAKE_ECLASS="cmake" +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit cmake-multilib python-any-r1 + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git" + inherit git-r3 +else + EGIT_COMMIT="a61d07a72763c1eb200de0a2c316703643a0d1d9" + SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + S="${WORKDIR}"/${MY_PN}-${EGIT_COMMIT} +fi + +DESCRIPTION="Provides an API and commands for processing SPIR-V modules" +HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Tools" + +LICENSE="Apache-2.0" +SLOT="0" +# Tests fail upon finding symbols that do not match a regular expression +# in the generated library. Easily hit with non-standard compiler flags +RESTRICT="test" +COMMON_DEPEND=">=dev-util/spirv-headers-1.5.4" +DEPEND="${COMMON_DEPEND}" +RDEPEND="" +BDEPEND="${PYTHON_DEPS} + ${COMMON_DEPEND}" + +multilib_src_configure() { + local mycmakeargs=( + "-DSPIRV-Headers_SOURCE_DIR=/usr/" + "-DSPIRV_WERROR=OFF" + "-DSPIRV_TOOLS_BUILD_STATIC=OFF" + "-DBUILD_SHARED_LIBS=ON" + ) + + cmake_src_configure +} diff --git a/dev-util/spirv-tools/spirv-tools-9999.ebuild b/dev-util/spirv-tools/spirv-tools-9999.ebuild index 97f9e9c25627..d1cdb00c129a 100644 --- a/dev-util/spirv-tools/spirv-tools-9999.ebuild +++ b/dev-util/spirv-tools/spirv-tools-9999.ebuild @@ -12,9 +12,10 @@ if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git" inherit git-r3 else - SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~ppc64 ~x86" - S="${WORKDIR}"/${MY_PN}-${PV} + EGIT_COMMIT="a61d07a72763c1eb200de0a2c316703643a0d1d9" + SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + S="${WORKDIR}"/${MY_PN}-${EGIT_COMMIT} fi DESCRIPTION="Provides an API and commands for processing SPIR-V modules" @@ -25,7 +26,7 @@ SLOT="0" # Tests fail upon finding symbols that do not match a regular expression # in the generated library. Easily hit with non-standard compiler flags RESTRICT="test" -COMMON_DEPEND=">=dev-util/spirv-headers-1.5.3" +COMMON_DEPEND=">=dev-util/spirv-headers-1.5.4" DEPEND="${COMMON_DEPEND}" RDEPEND="" BDEPEND="${PYTHON_DEPS} @@ -35,6 +36,8 @@ multilib_src_configure() { local mycmakeargs=( "-DSPIRV-Headers_SOURCE_DIR=/usr/" "-DSPIRV_WERROR=OFF" + "-DSPIRV_TOOLS_BUILD_STATIC=OFF" + "-DBUILD_SHARED_LIBS=ON" ) cmake_src_configure -- cgit v1.2.3-65-gdbad