metal: initial barebones texture reflection in shaders

This commit is contained in:
Alex Szpakowski
2020-07-29 18:11:20 -03:00
parent 426798ab10
commit eea78884d3
3 changed files with 44 additions and 6 deletions
+7 -1
View File
@@ -67,7 +67,7 @@ public:
}
};
Shader(love::graphics::ShaderStage *vertex, love::graphics::ShaderStage *pixel);
Shader(id<MTLDevice> device, love::graphics::ShaderStage *vertex, love::graphics::ShaderStage *pixel);
virtual ~Shader();
// Implements Shader.
@@ -86,6 +86,9 @@ public:
static int getUniformBufferBinding();
uint8 *getLocalUniformBufferData() { return localUniformBufferData; }
size_t getLocalUniformBufferSize() const { return localUniformBufferSize; }
private:
struct RenderPipelineHasher
@@ -101,6 +104,9 @@ private:
UniformInfo *builtinUniformInfo[BUILTIN_MAX_ENUM];
std::map<std::string, UniformInfo> uniforms;
uint8 *localUniformBufferData;
size_t localUniformBufferSize;
std::map<std::string, int> attributes;
std::unordered_map<RenderPipelineKey, const void *, RenderPipelineHasher> cachedRenderPipelines;