graphics: accept AGC vertex-buffer-only shaders

This commit is contained in:
nmzik committed 2026-08-18 03:53:43 +02:00
1 parent 93398d6d0f
commit b0bd6470f3
3 files changed
+34 -7

No files matched your search

+1 -1
View File
@@ -811,7 +811,7 @@ static bool ShaderGetStaticInputInfoVS(const HW::VertexShaderInfo& regs,
return false;
}
if (metadata.vertex_buffer_reg >= 0) {
if (metadata.vertex_attrib_reg >= 0) {
info.fetch_external = false;
info.fetch_embedded = true;
info.fetch_attrib_reg = metadata.vertex_attrib_reg;
+11 -6
View File
@@ -56,16 +56,21 @@ bool ShaderReadVertexMetadata(const ShaderMappedData& data, uint32_t max_user_sg
}
}
const bool embedded = next.vertex_buffer_reg >= 0 || next.vertex_attrib_reg >= 0;
if (!embedded) {
if (next.vertex_attrib_reg >= 0 && next.vertex_buffer_reg < 0) {
return Fail(error, "vertex attribute table requires a vertex buffer table");
}
if (next.vertex_buffer_reg < 0) {
metadata = next;
return true;
}
if (next.vertex_buffer_reg < 0 || next.vertex_attrib_reg < 0) {
return Fail(error, "vertex buffer and attribute tables must be supplied together");
if (static_cast<uint32_t>(next.vertex_buffer_reg) + 1u >= max_user_sgprs) {
return Fail(error, "vertex table pointer exceeds the user-SGPR domain");
}
if (static_cast<uint32_t>(next.vertex_buffer_reg) + 1u >= max_user_sgprs ||
static_cast<uint32_t>(next.vertex_attrib_reg) + 1u >= max_user_sgprs) {
if (next.vertex_attrib_reg < 0) {
metadata = next;
return true;
}
if (static_cast<uint32_t>(next.vertex_attrib_reg) + 1u >= max_user_sgprs) {
return Fail(error, "vertex table pointer exceeds the user-SGPR domain");
}
if (data.num_input_semantics == 0 ||