mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 00:59:18 +02:00
Its sources reached the standard library through the project headers they included; those are imports now. 178 headers across 56 files, plus 18 C library headers elsewhere for memcpy/printf and friends. MSVC's STL does not supply these transitively the way libstdc++ does.
33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
#include <yaml-cpp/yaml.h>
|
|
|
|
#include "nvrenderer_d3d12.h"
|
|
#include <string>
|
|
|
|
#if LIBMANUL_WITH_D3D12
|
|
|
|
void NvRendererBackend_D3D12::LoadShaderBlobs() {
|
|
auto root = YAML::LoadFile("shaders/shaders_dxil.manul");
|
|
|
|
for (const auto entry : root["materials"]) {
|
|
std::string_view material = entry.first.as<std::string_view>();
|
|
for (const auto shader : entry.second) {
|
|
auto binary = shader.second["binary"].as<YAML::Binary>();
|
|
auto entrypoint = shader.second["entrypoint"].as<std::string>();
|
|
AddMaterialShaderBlob(
|
|
material, shader.first.as<std::string_view>(),
|
|
std::string(binary.data(), binary.data() + binary.size()),
|
|
entrypoint);
|
|
}
|
|
}
|
|
|
|
for (const auto shader : root["utility"]) {
|
|
auto binary = shader.second["binary"].as<YAML::Binary>();
|
|
auto entrypoint = shader.second["entrypoint"].as<std::string>();
|
|
AddShaderBlob(shader.first.as<std::string_view>(),
|
|
std::string(binary.data(), binary.data() + binary.size()),
|
|
entrypoint);
|
|
}
|
|
}
|
|
|
|
#endif
|