aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/instructions/memory.cpp
diff options
context:
space:
mode:
authorGPUCode <[email protected]>2022-11-06 21:02:05 +0200
committerGPUCode <[email protected]>2023-05-09 17:18:45 +0300
commite0d528d7bfc638684afebd9b4b0272be8ca80c89 (patch)
tree7c8393737e61a71cd8173f1170e4148a6fff379e /src/instructions/memory.cpp
parentab75463999f4f3291976b079d42d52ee91eebf3f (diff)
downloadsirit-e0d528d7bfc638684afebd9b4b0272be8ca80c89.tar.gz
sirit-e0d528d7bfc638684afebd9b4b0272be8ca80c89.zip
Add missing GLSL instructions
Diffstat (limited to 'src/instructions/memory.cpp')
-rw-r--r--src/instructions/memory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/instructions/memory.cpp b/src/instructions/memory.cpp
index a542e9f..68f0154 100644
--- a/src/instructions/memory.cpp
+++ b/src/instructions/memory.cpp
@@ -46,6 +46,12 @@ Id Module::OpVectorInsertDynamic(Id result_type, Id vector, Id component, Id ind
<< index << EndOp{};
}
+Id Module::OpVectorShuffle(Id result_type, Id vector_1, Id vector_2, std::span<const Literal> components) {
+ code->Reserve(5 + components.size());
+ return *code << OpId{spv::Op::OpVectorShuffle, result_type} << vector_1 << vector_2
+ << components << EndOp{};
+}
+
Id Module::OpCompositeInsert(Id result_type, Id object, Id composite,
std::span<const Literal> indexes) {
code->Reserve(5 + indexes.size());