Add renderer texture transition contract
This commit is contained in:
@@ -21,6 +21,7 @@ enum class RecordedRenderCommandKind : std::uint8_t {
|
||||
draw,
|
||||
upload_texture,
|
||||
generate_mipmaps,
|
||||
transition_texture,
|
||||
copy_texture,
|
||||
read_texture,
|
||||
capture_frame,
|
||||
@@ -52,6 +53,8 @@ struct RecordedRenderCommand {
|
||||
std::uint32_t sampler_slot = 0;
|
||||
TextureDesc source_desc {};
|
||||
TextureDesc destination_desc {};
|
||||
TextureState before_state = TextureState::undefined;
|
||||
TextureState after_state = TextureState::undefined;
|
||||
ReadbackRegion readback_region {};
|
||||
ReadbackRegion source_region {};
|
||||
ReadbackRegion destination_region {};
|
||||
@@ -148,6 +151,10 @@ public:
|
||||
std::span<const std::byte> rgba_or_channel_bytes) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status generate_mipmaps(
|
||||
ITexture2D& texture) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status transition_texture(
|
||||
ITexture2D& texture,
|
||||
TextureState before,
|
||||
TextureState after) noexcept override;
|
||||
[[nodiscard]] pp::foundation::Status copy_texture(
|
||||
ITexture2D& source,
|
||||
ReadbackRegion source_region,
|
||||
|
||||
Reference in New Issue
Block a user