Add pdsg (palladium spirv-generator)

- remove glslang from pd-system
- use spirv blobs instead of glsl 460
- Use Legacy shaders for OpenGL2 backend
- add devnotes
This commit is contained in:
2026-03-18 21:21:00 +01:00
parent 7d89ab1c47
commit 71563e8979
14 changed files with 409 additions and 83 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
struct TBuiltInResource;
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<unsigned int> GLSL2SPV(Stage stage, const char* code);
static std::string SPV2GLSL(const std::vector<unsigned int>& spirv,
int version, bool es = false);
static std::string SPV2HLSL(const std::vector<unsigned int>& spirv,
int version);
};