Add renderer resource label contract
This commit is contained in:
@@ -17,6 +17,7 @@ constexpr std::uint64_t max_texture_bytes = 1024ULL * 1024ULL * 1024ULL;
|
||||
constexpr std::size_t max_shader_source_bytes = 4ULL * 1024ULL * 1024ULL;
|
||||
constexpr std::size_t max_shader_uniform_bytes = 64ULL * 1024ULL;
|
||||
constexpr std::size_t max_trace_label_bytes = 256;
|
||||
constexpr std::size_t max_resource_label_bytes = 256;
|
||||
|
||||
enum class TextureFormat : std::uint8_t {
|
||||
rgba8,
|
||||
@@ -66,6 +67,7 @@ struct TextureDesc {
|
||||
| TextureUsage::readback_source
|
||||
| TextureUsage::copy_source
|
||||
| TextureUsage::copy_destination;
|
||||
const char* debug_name = "";
|
||||
};
|
||||
|
||||
struct ReadbackRegion {
|
||||
@@ -190,6 +192,7 @@ struct MeshDesc {
|
||||
std::uint32_t vertex_count = 0;
|
||||
std::uint32_t index_count = 0;
|
||||
PrimitiveTopology topology = PrimitiveTopology::triangles;
|
||||
const char* debug_name = "";
|
||||
};
|
||||
|
||||
struct DrawDesc {
|
||||
@@ -322,6 +325,7 @@ public:
|
||||
[[nodiscard]] bool has_texture_usage(TextureUsage usage, TextureUsage required) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_extent(Extent2D extent) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_texture_usage(TextureUsage usage) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_resource_label(const char* label) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_texture_desc(TextureDesc desc) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_viewport(Viewport viewport, Extent2D target_extent) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status validate_scissor(ScissorRect scissor, Extent2D target_extent) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user