Replace spirv-helper stuff with a library that combines everything

This commit is contained in:
2026-03-19 15:54:01 +01:00
parent 71563e8979
commit 66602a79e0
19 changed files with 50 additions and 524 deletions

View File

@@ -1,34 +0,0 @@
#pragma once
#include <pd/common.hpp>
struct TBuiltInResource;
namespace PD {
class SpirvHelper {
public:
enum class Format {
GLSL,
HLSL,
MSL, // Not supported yet
SPIRV,
};
enum class Stage {
Vertex = 0,
Geometry = 3,
Fragment = 4,
};
SpirvHelper() = default;
~SpirvHelper() = default;
static void Init();
static void Finalize();
static void SetupResources(TBuiltInResource& resources);
static std::vector<PD::u32> GLSL2SPV(Stage stage, const char* code,
bool vulkan_mode = false);
static std::string SPV2GLSL(const std::vector<PD::u32>& spirv, int version,
bool es = false);
static std::string SPV2HLSL(const std::vector<PD::u32>& spirv, int version);
};
} // namespace PD