mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-24 08:16:23 +01:00
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.
This commit is contained in:
parent
88d37bedf0
commit
9f4d057aa2
2 changed files with 14 additions and 21 deletions
|
|
@ -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)); \
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue