| 1 | #pragma once |
| 2 | |
| 3 | #include <nn/gfx/detail/gfx_DataContainer.h> |
| 4 | #include <nn/gfx/gfx_Common.h> |
| 5 | #include <nn/gfx/gfx_DescriptorPoolData-api.nvn.8.h> |
| 6 | #include <nn/gfx/gfx_Enum.h> |
| 7 | |
| 8 | namespace nn::gfx { |
| 9 | |
| 10 | class DescriptorPoolInfo; |
| 11 | class DescriptorSlot; |
| 12 | class GpuAddress; |
| 13 | |
| 14 | namespace detail { |
| 15 | |
| 16 | template <> |
| 17 | class DescriptorPoolImpl<ApiVariationNvn8> |
| 18 | : public DataContainer<DescriptorPoolImplData<ApiVariationNvn8>> { |
| 19 | NN_NO_COPY(DescriptorPoolImpl); |
| 20 | |
| 21 | public: |
| 22 | typedef DescriptorPoolInfo InfoType; |
| 23 | |
| 24 | static size_t CalculateDescriptorPoolSize(DeviceImpl<ApiVariationNvn8>*, const InfoType&); |
| 25 | static ptrdiff_t GetDescriptorSlotIncrementSize(DeviceImpl<ApiVariationNvn8>*, |
| 26 | DescriptorPoolType); |
| 27 | static size_t GetDescriptorPoolAlignment(DeviceImpl<ApiVariationNvn8>*, const InfoType&); |
| 28 | |
| 29 | DescriptorPoolImpl(); |
| 30 | ~DescriptorPoolImpl(); |
| 31 | void Initialize(DeviceImpl<ApiVariationNvn8>*, const InfoType&, |
| 32 | MemoryPoolImpl<ApiVariationNvn8>*, ptrdiff_t, size_t); |
| 33 | void Finalize(DeviceImpl<ApiVariationNvn8>*); |
| 34 | void BeginUpdate(); |
| 35 | void EndUpdate(); |
| 36 | void SetBufferView(int, const GpuAddress&, size_t); |
| 37 | void SetSampler(int, const SamplerImpl<ApiVariationNvn8>*); |
| 38 | void SetTextureView(int, const TextureViewImpl<ApiVariationNvn8>*); |
| 39 | void SetImage(int, const TextureViewImpl<ApiVariationNvn8>*); |
| 40 | void SetBufferTextureView(int, const BufferTextureViewImpl<ApiVariationNvn8>*); |
| 41 | void SetBufferImage(int, const BufferTextureViewImpl<ApiVariationNvn8>*); |
| 42 | void GetDescriptorSlot(DescriptorSlot*, int) const; |
| 43 | int GetDescriptorSlotIndex(const DescriptorSlot&) const; |
| 44 | }; |
| 45 | } // namespace detail |
| 46 | } // namespace nn::gfx |