Skip to content

Commit

Permalink
update SPIRV-Tools to make glslang compile
Browse files Browse the repository at this point in the history
  • Loading branch information
tpgxyz committed Jan 5, 2023
1 parent 746e3f2 commit b080a70
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .abf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sources:
SPIRV-Tools-2022.4.tar.gz: 3e379904ad9b8d98a44d546637d5e63a29b5b900
SPIRV-Tools-40f5bf59c6acb4754a0bffd3c53a715732883a12.tar.gz: 14cb83b66cf113f0940da904bcb269f0b8f3a391
SPIRV-Headers-1d31a100405cf8783ca7a31e31cdd727c9fc54c3.tar.gz: 67eacd56caf44dc237c7273b737a1a38cd54d3fd
llvm-project-15.0.6.src.tar.xz: 0def887ec873f43c760aad2d2bb87f971c54d3b9
spirv-llvm-translator-15.0.6.tar.gz: dca0bb19b020e15ccbedc888d6ec3b161598eb42
4 changes: 2 additions & 2 deletions llvm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ Release: 0.%{date}.1
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-project-%{version}.src.tar.xz
# llvm-spirv-translator and friends
Source20: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/heads/llvm_release_150.tar.gz#/spirv-llvm-translator-%{version}.tar.gz
Release: 2
Release: 3
%endif
# HEAD as of 2022/12/20 also take a look here https://github.com/KhronosGroup/glslang/blob/master/known_good.json
Source21: https://github.com/KhronosGroup/SPIRV-Headers/archive/SPIRV-Headers-1d31a100405cf8783ca7a31e31cdd727c9fc54c3.tar.gz
Source22: https://github.com/KhronosGroup/SPIRV-Tools/archive/SPIRV-Tools-2022.4.tar.gz
Source22: https://github.com/KhronosGroup/SPIRV-Tools/archive/SPIRV-Tools-40f5bf59c6acb4754a0bffd3c53a715732883a12.tar.gz
# For compatibility with the nongnu.org libunwind
Source50: libunwind.pc.in
Source1000: llvm.rpmlintrc
Expand Down
56 changes: 28 additions & 28 deletions spirv-fix-warnings.patch
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp 2022-04-13 12:14:20.067548247 +0200
@@ -21,6 +21,8 @@
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/lint/divergence_analysis.cpp 2023-01-05 12:25:26.022464350 +0000
@@ -20,6 +20,8 @@
#include "source/opt/function.h"
#include "source/opt/instruction.h"
#include "spirv/unified1/spirv.h"

+#pragma GCC diagnostic ignored "-Wcovered-switch-default"
+
namespace spvtools {
namespace lint {

diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp 2022-04-13 12:14:20.067548247 +0200
@@ -232,6 +232,7 @@ void ConvertToSampledImagePass::FindUses
case SpvOpImageQuerySamples:
case SpvOpImageSparseFetch:
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/opt/convert_to_sampled_image_pass.cpp 2023-01-05 12:26:21.162253757 +0000
@@ -233,6 +233,7 @@
case spv::Op::OpImageQuerySamples:
case spv::Op::OpImageSparseFetch:
uses->push_back(user);
+ break;
+ break;
default:
break;
}
diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp 2022-04-13 12:14:20.067548247 +0200
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/opt/types.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/opt/types.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/opt/types.cpp 2023-01-05 12:26:43.022170214 +0000
@@ -25,6 +25,8 @@
#include "source/util/hash_combine.h"
#include "source/util/make_unique.h"
#include "spirv/unified1/spirv.h"

+#pragma GCC diagnostic ignored "-Wcovered-switch-default"
+
namespace spvtools {
namespace opt {
namespace analysis {
diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp 2022-04-13 12:14:20.069548241 +0200
@@ -192,6 +192,7 @@ bool ContainsInvalidBool(ValidationState
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_memory.cpp 2023-01-05 12:27:25.722006946 +0000
@@ -190,6 +190,7 @@
auto member_type = _.FindDef(member_type_id);
if (ContainsInvalidBool(_, member_type, skip_builtin)) return true;
}
+ break;
default:
break;
}
diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp 2022-04-13 12:14:20.069548241 +0200
@@ -464,6 +464,7 @@ spv_result_t ValidateExecutionMode(Valid
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_mode_setting.cpp 2023-01-05 12:30:05.381395635 +0000
@@ -572,6 +572,7 @@
"execution model.";
}
}
+ break;
default:
break;
}
diff -up llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp.29~ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp
--- llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp.29~ 2022-04-07 21:21:52.000000000 +0200
+++ llvm-project-14.0.1.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp 2022-04-13 12:14:20.069548241 +0200
@@ -62,6 +62,7 @@ spv_result_t PrimitivesPass(ValidationSt
diff -Naur llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp
--- llvm-project-15.0.6.src/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp 2022-12-05 20:31:01.000000000 +0000
+++ llvm-project-15.0.6.src.tpg/llvm/projects/SPIRV-Tools/source/val/validate_primitives.cpp 2023-01-05 12:53:45.955855818 +0000
@@ -62,6 +62,7 @@
<< spvOpcodeString(opcode)
<< ": expected Stream to be constant instruction";
}
Expand Down

0 comments on commit b080a70

Please sign in to comment.