diff options
author | ReinUsesLisp <[email protected]> | 2018-11-13 20:06:13 -0300 |
---|---|---|
committer | GitHub <[email protected]> | 2018-11-13 20:06:13 -0300 |
commit | 174263d90652f3081618749799662aea9f7bf304 (patch) | |
tree | f3abab6197aa57522d0b8df6b9fbd14a77d0d6a2 /include | |
parent | 30dbb951dd8b0ca1a7afabc14397a7f37a1142b9 (diff) | |
parent | 0318449d65e008b8e63b49e16f774a3c414aac0e (diff) | |
download | sirit-174263d90652f3081618749799662aea9f7bf304.tar.gz sirit-174263d90652f3081618749799662aea9f7bf304.zip |
Merge pull request #5 from FernandoS27/image
Implemented Image Instructions
Diffstat (limited to 'include')
-rw-r--r-- | include/sirit/sirit.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index f583a2b..3c08711 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -513,6 +513,86 @@ class Module { Id OpInterpolateAtOffset(Id result_type, Id interpolant, Id offset); + // Image + + Id OpSampledImage(Id result_type, Id image, Id sampler); + + Id OpImageSampleImplicitLod( + Id result_type, Id sampled_image, Id coordinate, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate, + spv::ImageOperandsMask image_operands, Id lod, + const std::vector<Id>& operands = {}); + + Id OpImageSampleDrefImplicitLod( + Id result_type, Id sampled_image, Id coordinate, Id dref, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageSampleDrefExplicitLod(Id result_type, Id sampled_image, + Id coordinate, Id dref, + spv::ImageOperandsMask image_operands, + Id lod, + const std::vector<Id>& operands = {}); + + Id OpImageSampleProjImplicitLod( + Id result_type, Id sampled_image, Id coordinate, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageSampleProjExplicitLod(Id result_type, Id sampled_image, + Id coordinate, + spv::ImageOperandsMask image_operands, + Id lod, + const std::vector<Id>& operands = {}); + + Id OpImageSampleProjDrefImplicitLod( + Id result_type, Id sampled_image, Id coordinate, Id dref, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageSampleProjDrefExplicitLod(Id result_type, Id sampled_image, + Id coordinate, Id dref, + spv::ImageOperandsMask image_operands, + Id lod, + const std::vector<Id>& operands = {}); + + Id OpImageFetch(Id result_type, Id sampled_image, Id coordinate, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageGather(Id result_type, Id sampled_image, Id coordinate, + Id component, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id + OpImageDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageRead(Id result_type, Id sampled_image, Id coordinate, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImageWrite(Id image, Id coordinate, Id texel, + std::optional<spv::ImageOperandsMask> image_operands = {}, + const std::vector<Id>& operands = {}); + + Id OpImage(Id result_type, Id sampled_image); + + Id OpImageQuerySizeLod(Id result_type, Id image, Id level_of_detail); + + Id OpImageQuerySize(Id result_type, Id image); + + Id OpImageQueryLod(Id result_type, Id image, Id coordinate); + + Id OpImageQueryLevels(Id result_type, Id image); + + Id OpImageQuerySamples(Id result_type, Id image); + private: Id AddCode(std::unique_ptr<Op> op); |