shader: parse vertex metadata once when a shader is mapped

This commit is contained in:
nmzik committed 2026-10-24 05:44:46 +02:00
1 parent dbc7b8b2ff
commit 8291cfeb04
6 files changed
+44 -44

No files matched your search

+4 -4
View File
@@ -4,7 +4,6 @@
#include "graphics/shader/shader.h"
#include <span>
#include <string>
namespace Libs::Graphics {
@@ -14,9 +13,10 @@ struct ShaderVertexMetadata {
std::span<const ShaderSemantic> input_semantics;
};
// Validates the vertex metadata and returns a view into the shader header.
bool ShaderReadVertexMetadata(const ShaderMappedData& data, uint32_t max_user_sgprs,
ShaderVertexMetadata& metadata, std::string* error);
// Reads the vertex metadata as a view into the shader header. Returns nullptr if it is
// valid, otherwise why it was rejected.
const char* ShaderReadVertexMetadata(const ShaderMappedData& data, uint32_t max_user_sgprs,
ShaderVertexMetadata& metadata);
} // namespace Libs::Graphics