Loading...
Searching...
No Matches
D3D12HostImportUpload.hpp
Go to the documentation of this file.
1#pragma once
2
31#include <score_plugin_gfx_export.h>
32
33#include <cstddef>
34#include <cstdint>
35#include <vector>
36
37class QRhi;
38class QRhiTexture;
39class QRhiCommandBuffer;
40
41namespace score::gfx::interop
42{
43
44class SCORE_PLUGIN_GFX_EXPORT D3D12HostImportUpload
45{
46public:
48
51 static std::size_t requiredAlignment(QRhi& rhi) noexcept;
52
55 static bool pitchUsable(std::size_t rowPitch) noexcept;
56
60 bool init(
61 QRhi& rhi, const std::vector<void*>& slots, std::size_t bytes,
62 std::size_t rowPitch);
63 void release();
64
65 bool valid() const noexcept { return !m_buffers.empty(); }
66
69 bool copyToTexture(
70 QRhiCommandBuffer& cb, QRhiTexture& tex, std::size_t slot, int width,
71 int height, std::size_t srcOffset = 0) noexcept;
72
73private:
74 struct Impl;
75 Impl* m_d{};
76 std::vector<void*> m_buffers;
77};
78
79} // namespace score::gfx::interop
Definition D3D12HostImportUpload.hpp:45
Definition D3D12HostImportUpload.cpp:258