summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sarnie <sarnex@gentoo.org>2019-03-03 09:39:37 -0500
committerNick Sarnie <sarnex@gentoo.org>2019-03-03 09:47:40 -0500
commit1f846f1c5d2c33badd5274386ba3be75959fad53 (patch)
tree9c24af4cbbbc4293fd94d1a5cea913d49f0c3e51
parentnet-misc/openssh: Removed old. (diff)
downloadgentoo-1f846f1c5d2.tar.gz
gentoo-1f846f1c5d2.tar.bz2
gentoo-1f846f1c5d2.zip
dev-util/spirv-tools: Bump revision
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
-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)2
2 files changed, 115 insertions, 0 deletions
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..49e7dc8a87d7 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,8 @@ 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=(