rsx/vk: Improve robustness when encountering corrupted shaders

This commit is contained in:
kd-11 2026-02-21 21:20:11 +03:00 committed by kd-11
parent 77cbdd82ab
commit 302e87c920
2 changed files with 17 additions and 0 deletions

View file

@ -868,8 +868,11 @@ std::string FragmentProgramDecompiler::BuildCode()
if (!m_is_valid_ucode)
{
// If the code is broken, do not compile. Simply NOP main and write empty outputs
m_parr.params[PF_PARAM_UNIFORM].clear();
insertHeader(OS);
OS << "\n";
insertConstants(OS);
OS << "\n";
OS << "void main()\n";
OS << "{\n";
OS << "#if 0\n";

View file

@ -635,9 +635,16 @@ bool VKGSRender::bind_texture_env()
{
if (!(textures_ref & 1))
{
// Unused TIU
continue;
}
if (m_fs_binding_table->ftex_location[i] == umax)
{
// Corrupt shader table
break;
}
vk::image_view* view = nullptr;
auto sampler_state = static_cast<vk::texture_cache::sampled_image_descriptor*>(fs_sampler_state[i].get());
@ -707,9 +714,16 @@ bool VKGSRender::bind_texture_env()
{
if (!(textures_ref & 1))
{
// Unused TIU
continue;
}
if (m_vs_binding_table->vtex_location[i] == umax)
{
// Corrupt shader
break;
}
if (!rsx::method_registers.vertex_textures[i].enabled())
{
const auto view_type = vk::get_view_type(current_vertex_program.get_texture_dimension(i));