259struct std::formatter<spark::render::BufferFormat> : std::formatter<std::string_view>
261 static constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
263 static constexpr auto format(
const spark::render::BufferFormat format,
auto& ctx)
267 case spark::render::BufferFormat::None:
268 return std::format_to(ctx.out(),
"None");
269 case spark::render::BufferFormat::X16F:
270 return std::format_to(ctx.out(),
"X16F");
271 case spark::render::BufferFormat::X16I:
272 return std::format_to(ctx.out(),
"X16I");
273 case spark::render::BufferFormat::X16U:
274 return std::format_to(ctx.out(),
"X16U");
275 case spark::render::BufferFormat::XY16F:
276 return std::format_to(ctx.out(),
"XY16F");
277 case spark::render::BufferFormat::XY16I:
278 return std::format_to(ctx.out(),
"XY16I");
279 case spark::render::BufferFormat::XY16U:
280 return std::format_to(ctx.out(),
"XY16U");
281 case spark::render::BufferFormat::XYZ16F:
282 return std::format_to(ctx.out(),
"XYZ16F");
283 case spark::render::BufferFormat::XYZ16I:
284 return std::format_to(ctx.out(),
"XYZ16I");
285 case spark::render::BufferFormat::XYZ16U:
286 return std::format_to(ctx.out(),
"XYZ16U");
287 case spark::render::BufferFormat::XYZW16F:
288 return std::format_to(ctx.out(),
"XYZW16F");
289 case spark::render::BufferFormat::XYZW16I:
290 return std::format_to(ctx.out(),
"XYZW16I");
291 case spark::render::BufferFormat::XYZW16U:
292 return std::format_to(ctx.out(),
"XYZW16U");
293 case spark::render::BufferFormat::X32F:
294 return std::format_to(ctx.out(),
"X32F");
295 case spark::render::BufferFormat::X32I:
296 return std::format_to(ctx.out(),
"X32I");
297 case spark::render::BufferFormat::X32U:
298 return std::format_to(ctx.out(),
"X32U");
299 case spark::render::BufferFormat::XY32F:
300 return std::format_to(ctx.out(),
"XY32F");
301 case spark::render::BufferFormat::XY32I:
302 return std::format_to(ctx.out(),
"XY32I");
303 case spark::render::BufferFormat::XY32U:
304 return std::format_to(ctx.out(),
"XY32U");
305 case spark::render::BufferFormat::XYZ32F:
306 return std::format_to(ctx.out(),
"XYZ32F");
307 case spark::render::BufferFormat::XYZ32I:
308 return std::format_to(ctx.out(),
"XYZ32I");
309 case spark::render::BufferFormat::XYZ32U:
310 return std::format_to(ctx.out(),
"XYZ32U");
311 case spark::render::BufferFormat::XYZW32F:
312 return std::format_to(ctx.out(),
"XYZW32F");
313 case spark::render::BufferFormat::XYZW32I:
314 return std::format_to(ctx.out(),
"XYZW32I");
315 case spark::render::BufferFormat::XYZW32U:
316 return std::format_to(ctx.out(),
"XYZW32U");
318 return std::format_to(ctx.out(),
"Unknown");
323struct std::formatter<spark::render::BufferType> : std::formatter<std::string_view>
325 static constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
327 static constexpr auto format(
const spark::render::BufferType type,
auto& ctx)
331 case spark::render::BufferType::Vertex:
332 return std::format_to(ctx.out(),
"Vertex");
333 case spark::render::BufferType::Index:
334 return std::format_to(ctx.out(),
"Index");
335 case spark::render::BufferType::Uniform:
336 return std::format_to(ctx.out(),
"Uniform");
337 case spark::render::BufferType::Storage:
338 return std::format_to(ctx.out(),
"Storage");
339 case spark::render::BufferType::Texel:
340 return std::format_to(ctx.out(),
"Texel");
341 case spark::render::BufferType::Other:
342 return std::format_to(ctx.out(),
"Other");
344 return std::format_to(ctx.out(),
"Unknown");