feat(lang): support assembly sources and shader bundles
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 9s
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 8s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 12s
VoidBuildSystem CI / fuzz-clang (push) Failing after 5s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 49s

This commit is contained in:
faumaray committed 2026-12-05 14:14:25 +03:00
1 parent ce041ace07
commit 0c1bf7e5b2
11 files changed
+519 -21

No files matched your search

+14
View File
@@ -36,6 +36,14 @@ enum class CStandard { Default, C11, C17, C23 };
enum class CxxStandard { Default, Cxx17, Cxx20, Cxx23, Cxx26 };
enum class LtoMode { None, Full, Thin };
enum class Sanitizer { Address, Undefined, Thread, Memory, Leak };
enum class ShaderLanguage { Auto, Glsl, Hlsl, Slang };
enum class ShaderStage { Auto, Vertex, Fragment, Compute, Geometry, TessControl, TessEval };
struct ShaderSource {
std::string path;
ShaderLanguage language{ShaderLanguage::Auto};
ShaderStage stage{ShaderStage::Auto};
};
[[nodiscard]] std::string_view compiler_name(CompilerFamily compiler);
[[nodiscard]] CompilerFamily parse_compiler(std::string_view name);
@@ -203,6 +211,7 @@ struct TargetRecord {
std::map<std::string, std::string, std::less<>> environment;
std::vector<std::string> labels; // Test labels for filtering (`vbs test --label`).
std::vector<std::string> resources; // Exclusive resources held while the test runs.
std::vector<ShaderSource> shaders; // Shader sources compiled to SPIR-V.
std::vector<std::string> fixture_setup; // Fixtures this test sets up.
std::vector<std::string> fixture_required; // Fixtures this test requires.
std::vector<std::string> fixture_cleanup; // Fixtures this test tears down.
@@ -291,6 +300,9 @@ class Target {
Target &env(std::string key, std::string value);
Target &label(std::string label);
Target &resource(std::string name);
// Declares a shader source on a shader bundle (compiled to SPIR-V on build).
Target &shader(std::string source_path, ShaderLanguage language = ShaderLanguage::Auto,
ShaderStage stage = ShaderStage::Auto);
Target &fixture_setup(std::string name);
Target &fixture_required(std::string name);
Target &fixture_cleanup(std::string name);
@@ -352,6 +364,8 @@ class Project {
[[nodiscard]] Target header_only_library(std::string name);
[[nodiscard]] Target object_library(std::string name);
[[nodiscard]] Target custom_action(std::string name);
// A target that compiles declared shader sources to SPIR-V (`.shader(...)`).
[[nodiscard]] Target shader_bundle(std::string name);
[[nodiscard]] Target test(std::string name);
[[nodiscard]] Dependency dependency(std::string name);
// Links to another member of the enclosing workspace. The member path is supplied by the