aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/instructions
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2019-12-15 18:23:59 -0300
committerReinUsesLisp <[email protected]>2019-12-15 18:23:59 -0300
commit9f4d057aa28c4e9509bdc767afb27b4aee303b7e (patch)
treedc8eb93ea4ef5e51311e3da2c1d362b36a05c34c /src/instructions
parent88d37bedf0d3ca9e3baa4d6eb18d1c6039db23d3 (diff)
downloadsirit-9f4d057aa28c4e9509bdc767afb27b4aee303b7e.tar.gz
sirit-9f4d057aa28c4e9509bdc767afb27b4aee303b7e.zip
image: Remove assumed lod in image samples
This commits breaks the API. Depth image samples assumed a lod operand, this made using Grad samples clumsy to use.
Diffstat (limited to 'src/instructions')
-rw-r--r--src/instructions/image.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/instructions/image.cpp b/src/instructions/image.cpp
index 6d8cde3..d12dc2c 100644
--- a/src/instructions/image.cpp
+++ b/src/instructions/image.cpp
@@ -31,13 +31,11 @@ static void AddImageOperands(Op* op, std::optional<spv::ImageOperandsMask> image
#define DEFINE_IMAGE_EXP_OP(opcode) \
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, \
- spv::ImageOperandsMask image_operands, Id lod, \
- const std::vector<Id>& operands) { \
+ spv::ImageOperandsMask image_operands, const std::vector<Id>& operands) { \
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
op->Add(sampled_image); \
op->Add(coordinate); \
op->Add(static_cast<u32>(image_operands)); \
- op->Add(lod); \
op->Add(operands); \
return AddCode(std::move(op)); \
}
@@ -56,14 +54,12 @@ static void AddImageOperands(Op* op, std::optional<spv::ImageOperandsMask> image
#define DEFINE_IMAGE_EXTRA_EXP_OP(opcode) \
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, Id extra, \
- spv::ImageOperandsMask image_operands, Id lod, \
- const std::vector<Id>& operands) { \
+ spv::ImageOperandsMask image_operands, const std::vector<Id>& operands) { \
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
op->Add(sampled_image); \
op->Add(coordinate); \
op->Add(extra); \
op->Add(static_cast<u32>(image_operands)); \
- op->Add(lod); \
op->Add(operands); \
return AddCode(std::move(op)); \
}