Fix texture-as-buffer view format string generation

This commit is contained in:
baldurk
2022-05-23 14:43:08 +01:00
parent 6db5e339bb
commit c5a588d2e4
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -2214,7 +2214,7 @@ QString BufferFormatter::GetTextureFormatString(const TextureDescription &tex)
if(tex.type == TextureType::Buffer)
return QFormatStr("%1 %2;").arg(baseType).arg(varName);
return QFormatStr("%1 %2[%3];").arg(baseType).arg(varName).arg(w);
return QFormatStr("struct row\n{\n %1 %2[%3];\n};\n\nrow r[];").arg(baseType).arg(varName).arg(w);
}
QString BufferFormatter::GetBufferFormatString(Packing::Rules pack, const ShaderResource &res,