Add paint feedback strategy planner
This commit is contained in:
@@ -132,6 +132,12 @@ enum class BlitFilter : std::uint8_t {
|
||||
linear,
|
||||
};
|
||||
|
||||
enum class PaintFeedbackPath : std::uint8_t {
|
||||
none,
|
||||
framebuffer_fetch,
|
||||
ping_pong_textures,
|
||||
};
|
||||
|
||||
enum class BlendFactor : std::uint8_t {
|
||||
zero,
|
||||
one,
|
||||
@@ -236,6 +242,19 @@ struct RenderDeviceFeatures {
|
||||
bool float32_render_targets = false;
|
||||
};
|
||||
|
||||
struct PaintFeedbackPlan {
|
||||
PaintFeedbackPath path = PaintFeedbackPath::none;
|
||||
TextureDesc target_desc {};
|
||||
TextureDesc auxiliary_desc {};
|
||||
std::uint64_t target_bytes = 0;
|
||||
bool complex_blend = false;
|
||||
bool reads_destination_color = false;
|
||||
bool requires_auxiliary_texture = false;
|
||||
bool requires_texture_copy = false;
|
||||
bool requires_render_target_blit = false;
|
||||
bool requires_explicit_transition = false;
|
||||
};
|
||||
|
||||
class ITexture2D {
|
||||
public:
|
||||
virtual ~ITexture2D() = default;
|
||||
@@ -393,10 +412,15 @@ public:
|
||||
[[nodiscard]] pp::foundation::Status validate_blit_descs(
|
||||
TextureDesc source,
|
||||
TextureDesc destination) noexcept;
|
||||
[[nodiscard]] pp::foundation::Result<PaintFeedbackPlan> plan_paint_feedback(
|
||||
RenderDeviceFeatures features,
|
||||
TextureDesc target_desc,
|
||||
bool complex_blend) noexcept;
|
||||
[[nodiscard]] const char* texture_format_name(TextureFormat format) noexcept;
|
||||
[[nodiscard]] const char* texture_state_name(TextureState state) noexcept;
|
||||
[[nodiscard]] const char* primitive_topology_name(PrimitiveTopology topology) noexcept;
|
||||
[[nodiscard]] const char* blit_filter_name(BlitFilter filter) noexcept;
|
||||
[[nodiscard]] const char* paint_feedback_path_name(PaintFeedbackPath path) noexcept;
|
||||
[[nodiscard]] const char* blend_factor_name(BlendFactor factor) noexcept;
|
||||
[[nodiscard]] const char* blend_op_name(BlendOp op) noexcept;
|
||||
[[nodiscard]] const char* compare_op_name(CompareOp op) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user