score
Home
Classes
Namespaces
Files
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
37
class
QRhi;
38
class
QRhiTexture;
39
class
QRhiCommandBuffer;
40
41
namespace
score::gfx::interop
42
{
43
44
class
SCORE_PLUGIN_GFX_EXPORT
D3D12HostImportUpload
45
{
46
public
:
47
~D3D12HostImportUpload
();
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
73
private
:
74
struct
Impl
;
75
Impl
* m_d{};
76
std::vector<void*> m_buffers;
77
};
78
79
}
// namespace score::gfx::interop
score::gfx::interop::D3D12HostImportUpload
Definition
D3D12HostImportUpload.hpp:45
score::gfx::interop::D3D12HostImportUpload::Impl
Definition
D3D12HostImportUpload.cpp:258