shader: type packed integer vertex inputs by their component type

This commit is contained in:
nmzik committed 2026-10-30 02:59:36 +01:00
1 parent b65dd18224
commit 1703836d06
4 files changed
+13 -38

No files matched your search

+4 -2
View File
@@ -48040,8 +48040,10 @@ void CheckEmbeddedFetchVertexOffset() {
return ResolveDrawOffsets(0, vertex).second;
};
// Packed integer formats load integers too.
for (const auto format : {Prospero::BufferFormat::k32_32_32_32Float,
Prospero::BufferFormat::k32_32_32_32UInt}) {
Prospero::BufferFormat::k32_32_32_32UInt,
Prospero::BufferFormat::k10_10_10_2UInt}) {
const auto local = Compile("LocalEmbeddedFetch", MakeFetch({}, {}, 0, false, true),
0, ShaderType::Local, format);
ValidateSpirv("LocalEmbeddedFetch", local.spirv);
@@ -48050,7 +48052,7 @@ void CheckEmbeddedFetchVertexOffset() {
return input.kind == ShaderRecompiler::IR::StageInputKind::Parameter &&
input.location == 0;
}), "LS indexed fetch must consume native vertex attributes");
if (format == Prospero::BufferFormat::k32_32_32_32UInt) {
if (format != Prospero::BufferFormat::k32_32_32_32Float) {
spvtools::SpirvTools tools(SPV_ENV_VULKAN_1_2);
std::string assembly;
Require("LocalEmbeddedFetch", "disassembly", tools.Disassemble(local.spirv, &assembly),