graphics: consume vertex semantics directly from shader metadata

This commit is contained in:
nmzik
2026-09-29 04:27:37 +04:00
parent 6d6666819a
commit e57c37fa9c
4 changed files with 18 additions and 22 deletions
+5 -6
View File
@@ -3,19 +3,18 @@
#include "graphics/shader/shader.h"
#include <array>
#include <span>
#include <string>
namespace Libs::Graphics {
struct ShaderVertexMetadata {
int vertex_buffer_reg = -1;
int vertex_attrib_reg = -1;
std::array<ShaderSemantic, ShaderVertexInputInfo::RES_MAX> input_semantics {};
uint32_t input_semantics_count = 0;
int vertex_buffer_reg = -1;
int vertex_attrib_reg = -1;
std::span<const ShaderSemantic> input_semantics;
};
// Copies the small AGC metadata subset used by the vertex path after validating every guest range.
// 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);