diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-27 03:04:13 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-20 21:38:33 -0300 |
| commit | 9097301d924ac9d873f04acdc247e8023edf1811 (patch) | |
| tree | 7d50b941e27ab947975432381842aa4605325e78 /src/video_core/shader/node.h | |
| parent | 06c4ce86458310870abec90ada68ac393256b9b6 (diff) | |
shader: Implement bindless images
Diffstat (limited to 'src/video_core/shader/node.h')
| -rw-r--r-- | src/video_core/shader/node.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index 8b8d83ae7..2bf535928 100644 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h @@ -270,6 +270,15 @@ public: explicit Image(std::size_t offset, std::size_t index, Tegra::Shader::ImageType type) : offset{offset}, index{index}, type{type}, is_bindless{false} {} + explicit Image(u32 cbuf_index, u32 cbuf_offset, std::size_t index, + Tegra::Shader::ImageType type) + : offset{(static_cast<u64>(cbuf_index) << 32) | cbuf_offset}, index{index}, type{type}, + is_bindless{true} {} + + explicit Image(std::size_t offset, std::size_t index, Tegra::Shader::ImageType type, + bool is_bindless) + : offset{offset}, index{index}, type{type}, is_bindless{is_bindless} {} + std::size_t GetOffset() const { return offset; } |
