summaryrefslogtreecommitdiff
path: root/dev-util/spirv-tools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-19 11:37:34 +0000
commitb7b97785ebbb2f11d24d14dab8b81ed274f4ce6a (patch)
tree9fd110f9fc996e8a4213eeda994a8c112491b86d /dev-util/spirv-tools
parent066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (diff)
gentoo resync : 19.03.2019
Diffstat (limited to 'dev-util/spirv-tools')
-rw-r--r--dev-util/spirv-tools/Manifest3
-rw-r--r--dev-util/spirv-tools/files/spirv-tools-2019.1-Fix-vertex-instrumentation.patch113
-rw-r--r--dev-util/spirv-tools/spirv-tools-2019.1-r1.ebuild (renamed from dev-util/spirv-tools/spirv-tools-2019.1.ebuild)1
3 files changed, 116 insertions, 1 deletions
diff --git a/dev-util/spirv-tools/Manifest b/dev-util/spirv-tools/Manifest
index 7d0244b53377..3b8f115c202e 100644
--- a/dev-util/spirv-tools/Manifest
+++ b/dev-util/spirv-tools/Manifest
@@ -1,8 +1,9 @@
+AUX spirv-tools-2019.1-Fix-vertex-instrumentation.patch 4948 BLAKE2B 72df8f60ee84d3b129803e1ac2c2befa59392bd9cde51070155798f12e3d72bb5de0bfb93117599f315e6f106c6f9852dbad4d1ce0d9b4f3831a5af3844ef0c6 SHA512 9f1fe685e9205e848cc931802c003529b885c1f409a12e6bf118269a3073be8535ab3431cfcea9d89e8d78b55205795861d47e94f9728153541efe9354564003
DIST spirv-tools-2018.4.tar.gz 1327904 BLAKE2B 1ed01edf0dd5e8c3ac0d1a866d27f2e2ef377e9c082579291f8e755592ff3ea4f44a597e3e7694977500b9434889b0f741e03d566e777bb0f9af5e2e59374d61 SHA512 6b982efb30529e7f7776d7702f563bb4f874b9be3a7b0d838d77a15813f4177da99c152f40f11854fc3d60791ecf4026e006ff25a216bb44194dfd921c50920d
DIST spirv-tools-2018.5.tar.gz 1354299 BLAKE2B a2f74ac52cbcb3881009274c41cf8be48ae91d2d62d9e687d28719e65bb7cd5c0a5104a967e995fc5da066c1e6a278df4bf285fa9bf617660072bd0ee535b9bb SHA512 068a39e15111f24ad2a6b27e7ada786b3124b239aa8b13e187a4d512044db57a8e6a0fccadd0451155e1f57c96c8dec91a2338996c59fc883007cf7be07f2cad
DIST spirv-tools-2019.1.tar.gz 1493682 BLAKE2B 823b6435fd59a732075073bcecfbfa3081248a2fff21a1375502b812b30a1f988bb32afc41d2f6a6244b4bf37aa9fee2fab710f2cf6d051170e3622d8adf632f SHA512 c528046e1495d58ff0aca773b3b8fa091f943414853cf0344d8e690d868e0df5b1aa66bddbab245c5e52cc2fbaf0a2032a3be518fb8ada7f89b8023fa89776b4
EBUILD spirv-tools-2018.4.ebuild 1034 BLAKE2B 891188fa617878fd86b7847dc32cefeb69801fa89594763b212891018bd0e251fb64401fed9a4520ab82685843916f3b1f4f94017937fc1adaad4bf8bd847bc5 SHA512 78784487fe26c9a5562d8d7aff69b45e40c13b3850319b1f45b48ab84bfdb1ce90ebab3edcc112935bc3a64b63603e8505c2fc3ee7393d5541c2bc2587c51b0d
EBUILD spirv-tools-2018.5.ebuild 1033 BLAKE2B 43041e0dcf349d1626cf0e247d9078870291527663cf5a689e2a77cf0b5d1b02007534a1a56f7d13fcb39c11c81ad10b92aac7e69db0105f85fae9675c316219 SHA512 06c008fcaf213eddabcd0a507a97219a711c2cc9d0c0b6994a2b8f096894266229732c18625b8d14e5b3f885b5078a1348f496321d08faccfc7ee1cfb3929344
-EBUILD spirv-tools-2019.1.ebuild 1034 BLAKE2B 05deb016aade08af27d23eaa13f07557294cc8dc51bd287224216f251911dc1c4c38943a2ce99439c5c4530815500edf570e15c4a810fd15978d36a388be9e19 SHA512 8f5fb33de2e5e6585a52f00d2d21ea22646a4a633547d08160bd5fb836035865452709445ff0adcafa9e2e9fa11b747fbc4ae6bb4531622caa4e128110e3b720
+EBUILD spirv-tools-2019.1-r1.ebuild 1106 BLAKE2B 9096aa222071fc43fcbd5288be281c78cba4154691904cfd120cac10084b73eb740743584a1d9a2607d884abe1e12fc2e278b9a25ded8a73fdc0c095576c4cc7 SHA512 9aadb1bff7f14003fb1ff57774ea737379127846cf6ec605f7f1effef2fd2c92b983c9cd06a94ccf2d11f10dab7a71b2253732f8bb60097d5098cd4742856e09
EBUILD spirv-tools-9999.ebuild 989 BLAKE2B 339235087f10627cde2be63c6183ccd4c8466f495f2027e84be6970a88356aa9da65276969abf792d1adfc201935542e6d96a73dbaefc0e07f190ccd1ad2d00b SHA512 9e54b8ddf9a38a6e5dc6d5250be45cd5fedd80c3035cc71cbbd07d26bf737a36128eadbd644bb6e7bf8331e1ad73b9e6adf5b56cc6702138c8e6bbff8ce47356
MISC metadata.xml 429 BLAKE2B 84129eb27ea4a745c90ed7eab09723b41b45a696375c41458c45a6163dc00cd15d208d6858ea4fd92280e3ff3bb385f340ec3684c980a97ea5fd46fdc4c24001 SHA512 13b340b0e43ba726370f3b013759adab727fc37e251ec5777d10541976843e3e575be23ee015af83dd2e98a1917f4d2511467a38afd064cef025ab4700f005a6
diff --git a/dev-util/spirv-tools/files/spirv-tools-2019.1-Fix-vertex-instrumentation.patch b/dev-util/spirv-tools/files/spirv-tools-2019.1-Fix-vertex-instrumentation.patch
new file mode 100644
index 000000000000..4ca2c53969a3
--- /dev/null
+++ b/dev-util/spirv-tools/files/spirv-tools-2019.1-Fix-vertex-instrumentation.patch
@@ -0,0 +1,113 @@
+From 8d2d66f30c5c25029ac029af2bc9c4aa6979e5bc Mon Sep 17 00:00:00 2001
+From: greg-lunarg <greg@lunarg.com>
+Date: Wed, 16 Jan 2019 16:02:07 -0700
+Subject: [PATCH] Fix vertex instrumentation to use VertexIndex and
+ InstanceIndex (#2294)
+
+...instead of VertexId and InstanceId
+---
+ include/spirv-tools/instrument.hpp | 4 ++--
+ source/opt/instrument_pass.cpp | 8 ++++----
+ source/opt/ir_context.cpp | 4 ++--
+ test/opt/inst_bindless_check_test.cpp | 14 +++++++-------
+ 4 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/include/spirv-tools/instrument.hpp b/include/spirv-tools/instrument.hpp
+index 69d1ad259..f8068099c 100644
+--- a/include/spirv-tools/instrument.hpp
++++ b/include/spirv-tools/instrument.hpp
+@@ -75,8 +75,8 @@ static const int kInstCommonOutCnt = 4;
+ // error.
+ //
+ // Vertex Shader Output Record Offsets
+-static const int kInstVertOutVertexId = kInstCommonOutCnt;
+-static const int kInstVertOutInstanceId = kInstCommonOutCnt + 1;
++static const int kInstVertOutVertexIndex = kInstCommonOutCnt;
++static const int kInstVertOutInstanceIndex = kInstCommonOutCnt + 1;
+
+ // Frag Shader Output Record Offsets
+ static const int kInstFragOutFragCoordX = kInstCommonOutCnt;
+diff --git a/source/opt/instrument_pass.cpp b/source/opt/instrument_pass.cpp
+index 8ba8ce504..6935a43dc 100644
+--- a/source/opt/instrument_pass.cpp
++++ b/source/opt/instrument_pass.cpp
+@@ -168,10 +168,10 @@ void InstrumentPass::GenStageStreamWriteCode(uint32_t stage_idx,
+ switch (stage_idx) {
+ case SpvExecutionModelVertex: {
+ // Load and store VertexId and InstanceId
+- GenBuiltinOutputCode(context()->GetBuiltinVarId(SpvBuiltInVertexId),
+- kInstVertOutVertexId, base_offset_id, builder);
+- GenBuiltinOutputCode(context()->GetBuiltinVarId(SpvBuiltInInstanceId),
+- kInstVertOutInstanceId, base_offset_id, builder);
++ GenBuiltinOutputCode(context()->GetBuiltinVarId(SpvBuiltInVertexIndex),
++ kInstVertOutVertexIndex, base_offset_id, builder);
++ GenBuiltinOutputCode(context()->GetBuiltinVarId(SpvBuiltInInstanceIndex),
++ kInstVertOutInstanceIndex, base_offset_id, builder);
+ } break;
+ case SpvExecutionModelGLCompute: {
+ // Load and store GlobalInvocationId. Second word is unused; store zero.
+diff --git a/source/opt/ir_context.cpp b/source/opt/ir_context.cpp
+index a2f207c0c..fe69027f8 100644
+--- a/source/opt/ir_context.cpp
++++ b/source/opt/ir_context.cpp
+@@ -669,8 +669,8 @@ uint32_t IRContext::GetBuiltinVarId(uint32_t builtin) {
+ reg_type = type_mgr->GetRegisteredType(&v4float_ty);
+ break;
+ }
+- case SpvBuiltInVertexId:
+- case SpvBuiltInInstanceId:
++ case SpvBuiltInVertexIndex:
++ case SpvBuiltInInstanceIndex:
+ case SpvBuiltInPrimitiveId:
+ case SpvBuiltInInvocationId:
+ case SpvBuiltInGlobalInvocationId: {
+diff --git a/test/opt/inst_bindless_check_test.cpp b/test/opt/inst_bindless_check_test.cpp
+index ddafb3dc2..a426ce04c 100644
+--- a/test/opt/inst_bindless_check_test.cpp
++++ b/test/opt/inst_bindless_check_test.cpp
+@@ -1650,7 +1650,7 @@ OpCapability Sampled1D
+ OpExtension "SPV_KHR_storage_buffer_storage_class"
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+-OpEntryPoint Vertex %main "main" %_ %coords2D %gl_VertexID %gl_InstanceID
++OpEntryPoint Vertex %main "main" %_ %coords2D %gl_VertexIndex %gl_InstanceIndex
+ OpSource GLSL 450
+ OpName %main "main"
+ OpName %lod "lod"
+@@ -1684,8 +1684,8 @@ OpMemberDecorate %_struct_61 0 Offset 0
+ OpMemberDecorate %_struct_61 1 Offset 4
+ OpDecorate %63 DescriptorSet 7
+ OpDecorate %63 Binding 0
+-OpDecorate %gl_VertexID BuiltIn VertexId
+-OpDecorate %gl_InstanceID BuiltIn InstanceId
++OpDecorate %gl_VertexIndex BuiltIn VertexIndex
++OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex
+ %void = OpTypeVoid
+ %12 = OpTypeFunction %void
+ %float = OpTypeFloat 32
+@@ -1730,8 +1730,8 @@ OpDecorate %gl_InstanceID BuiltIn InstanceId
+ %uint_2 = OpConstant %uint 2
+ %uint_3 = OpConstant %uint 3
+ %_ptr_Input_uint = OpTypePointer Input %uint
+-%gl_VertexID = OpVariable %_ptr_Input_uint Input
+-%gl_InstanceID = OpVariable %_ptr_Input_uint Input
++%gl_VertexIndex = OpVariable %_ptr_Input_uint Input
++%gl_InstanceIndex = OpVariable %_ptr_Input_uint Input
+ %uint_5 = OpConstant %uint 5
+ %uint_6 = OpConstant %uint 6
+ %uint_7 = OpConstant %uint 7
+@@ -1819,11 +1819,11 @@ OpStore %81 %55
+ %83 = OpIAdd %uint %68 %uint_3
+ %84 = OpAccessChain %_ptr_StorageBuffer_uint %63 %uint_1 %83
+ OpStore %84 %uint_0
+-%87 = OpLoad %uint %gl_VertexID
++%87 = OpLoad %uint %gl_VertexIndex
+ %88 = OpIAdd %uint %68 %uint_4
+ %89 = OpAccessChain %_ptr_StorageBuffer_uint %63 %uint_1 %88
+ OpStore %89 %87
+-%91 = OpLoad %uint %gl_InstanceID
++%91 = OpLoad %uint %gl_InstanceIndex
+ %93 = OpIAdd %uint %68 %uint_5
+ %94 = OpAccessChain %_ptr_StorageBuffer_uint %63 %uint_1 %93
+ OpStore %94 %91
+
diff --git a/dev-util/spirv-tools/spirv-tools-2019.1.ebuild b/dev-util/spirv-tools/spirv-tools-2019.1-r1.ebuild
index d59ad889f8bd..3a4de8ee7369 100644
--- a/dev-util/spirv-tools/spirv-tools-2019.1.ebuild
+++ b/dev-util/spirv-tools/spirv-tools-2019.1-r1.ebuild
@@ -20,6 +20,7 @@ RDEPEND=""
DEPEND=">=dev-util/spirv-headers-1.3.4_pre20190302"
EGIT_COMMIT="2297d4a3dfcbfd2a8b4312fab055ae26e3289fd3"
S="${WORKDIR}/SPIRV-Tools-${PV}"
+PATCHES=( "${FILESDIR}"/${PN}-2019.1-Fix-vertex-instrumentation.patch )
multilib_src_configure() {
local mycmakeargs=(