Add renderer texture upload contract
This commit is contained in:
@@ -13,6 +13,7 @@ enum class RecordedRenderCommandKind : std::uint8_t {
|
||||
bind_shader,
|
||||
bind_mesh,
|
||||
draw,
|
||||
upload_texture,
|
||||
read_texture,
|
||||
capture_frame,
|
||||
end_render_pass,
|
||||
@@ -27,6 +28,7 @@ struct RecordedRenderCommand {
|
||||
MeshDesc mesh_desc {};
|
||||
TextureDesc texture_desc {};
|
||||
ReadbackRegion readback_region {};
|
||||
std::uint64_t upload_bytes = 0;
|
||||
std::uint64_t readback_bytes = 0;
|
||||
std::uint64_t capture_bytes = 0;
|
||||
const char* component = "";
|
||||
@@ -93,6 +95,10 @@ public:
|
||||
ITexture2D& texture,
|
||||
ReadbackRegion region,
|
||||
IReadbackBuffer& destination) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status upload_texture(
|
||||
ITexture2D& texture,
|
||||
ReadbackRegion region,
|
||||
std::span<const std::byte> rgba_or_channel_bytes) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status capture_frame(
|
||||
IRenderTarget& target,
|
||||
IReadbackBuffer& destination) noexcept override;
|
||||
|
||||
Reference in New Issue
Block a user