rsx/vk: Rework MSAA implementation

This commit is contained in:
kd-11 2022-03-13 11:32:04 +03:00 committed by kd-11
parent 9c5ed01130
commit bc7ed8eaab
30 changed files with 285 additions and 123 deletions

View file

@ -134,7 +134,25 @@ void VKVertexDecompilerThread::insertConstants(std::stringstream & OS, const std
inputs.push_back(in);
OS << "layout(set = 0, binding=" << location++ << ") uniform " << PT.type << " " << PI.name << ";\n";
auto samplerType = PT.type;
if (m_prog.texture_state.multisampled_textures) [[ unlikely ]]
{
ensure(PI.name.length() > 3);
int index = atoi(&PI.name[3]);
if (m_prog.texture_state.multisampled_textures & (1 << index))
{
if (samplerType != "sampler1D" && samplerType != "sampler2D")
{
rsx_log.error("Unexpected multisampled sampler type '%s'", samplerType);
}
samplerType = "sampler2DMS";
}
}
OS << "layout(set = 0, binding=" << location++ << ") uniform " << samplerType << " " << PI.name << ";\n";
}
}
}