aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/instructions
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2020-06-02 02:13:37 -0300
committerReinUsesLisp <[email protected]>2020-06-02 02:13:37 -0300
commiteefca56afd49379bdebc97ded8b480839f930881 (patch)
tree95f34af4eb06a6390d586dad9d89f24d9a48e36a /src/instructions
parenta62c5bbc100a5e5a31ea0ccc4a78d8fa6a4167ce (diff)
downloadsirit-eefca56afd49379bdebc97ded8b480839f930881.tar.gz
sirit-eefca56afd49379bdebc97ded8b480839f930881.zip
memory: Add OpImageTexelPointer
Diffstat (limited to 'src/instructions')
-rw-r--r--src/instructions/memory.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/instructions/memory.cpp b/src/instructions/memory.cpp
index c2cdb52..33c8b07 100644
--- a/src/instructions/memory.cpp
+++ b/src/instructions/memory.cpp
@@ -19,6 +19,14 @@ Id Module::OpVariable(Id result_type, spv::StorageClass storage_class, Id initia
return code_store.emplace_back(std::move(op)).get();
}
+Id Module::OpImageTexelPointer(Id result_type, Id image, Id coordinate, Id sample) {
+ auto op{std::make_unique<Op>(spv::Op::OpImageTexelPointer, bound++, result_type)};
+ op->Add(image);
+ op->Add(coordinate);
+ op->Add(sample);
+ return AddCode(std::move(op));
+}
+
Id Module::OpLoad(Id result_type, Id pointer, std::optional<spv::MemoryAccessMask> memory_access) {
auto op{std::make_unique<Op>(spv::Op::OpLoad, bound++, result_type)};
op->Add(pointer);