|
@@ -83,19 +83,19 @@ InstBuilder &InstBuilder::opConstant(uint32_t resultType, uint32_t resultId,
|
|
|
InstBuilder &InstBuilder::opImageSample(
|
|
|
uint32_t result_type, uint32_t result_id, uint32_t sampled_image,
|
|
|
uint32_t coordinate, uint32_t dref,
|
|
|
- llvm::Optional<spv::ImageOperandsMask> image_operands, bool isExplicit,
|
|
|
- bool isSparse) {
|
|
|
+ llvm::Optional<spv::ImageOperandsMask> image_operands, bool is_explicit,
|
|
|
+ bool is_sparse) {
|
|
|
spv::Op op = spv::Op::Max;
|
|
|
if (dref) {
|
|
|
- op = isExplicit ? (isSparse ? spv::Op::OpImageSparseSampleDrefExplicitLod
|
|
|
- : spv::Op::OpImageSampleDrefExplicitLod)
|
|
|
- : (isSparse ? spv::Op::OpImageSparseSampleDrefImplicitLod
|
|
|
- : spv::Op::OpImageSampleDrefImplicitLod);
|
|
|
+ op = is_explicit ? (is_sparse ? spv::Op::OpImageSparseSampleDrefExplicitLod
|
|
|
+ : spv::Op::OpImageSampleDrefExplicitLod)
|
|
|
+ : (is_sparse ? spv::Op::OpImageSparseSampleDrefImplicitLod
|
|
|
+ : spv::Op::OpImageSampleDrefImplicitLod);
|
|
|
} else {
|
|
|
- op = isExplicit ? (isSparse ? spv::Op::OpImageSparseSampleExplicitLod
|
|
|
- : spv::Op::OpImageSampleExplicitLod)
|
|
|
- : (isSparse ? spv::Op::OpImageSparseSampleImplicitLod
|
|
|
- : spv::Op::OpImageSampleImplicitLod);
|
|
|
+ op = is_explicit ? (is_sparse ? spv::Op::OpImageSparseSampleExplicitLod
|
|
|
+ : spv::Op::OpImageSampleExplicitLod)
|
|
|
+ : (is_sparse ? spv::Op::OpImageSparseSampleImplicitLod
|
|
|
+ : spv::Op::OpImageSampleImplicitLod);
|
|
|
}
|
|
|
|
|
|
TheInst.emplace_back(static_cast<uint32_t>(op));
|
|
@@ -103,7 +103,7 @@ InstBuilder &InstBuilder::opImageSample(
|
|
|
TheInst.emplace_back(result_id);
|
|
|
TheInst.emplace_back(sampled_image);
|
|
|
TheInst.emplace_back(coordinate);
|
|
|
- if(dref)
|
|
|
+ if (dref)
|
|
|
TheInst.emplace_back(dref);
|
|
|
if (image_operands.hasValue()) {
|
|
|
const auto &val = image_operands.getValue();
|