Fix #133645: Metal: Crash when activating EEVEE on MacOS 13.7.2 with AMD

This was caused by the subpass input workaround for non-tilebased
GPU using `texelFetch` on an `image`. This was supported before
the cleanup 9c0321ae9b.
But is against the GLSL specification and was removed inside the
cleanup.

Using `imageLoad` instead of `texelFetch` fixes the crash.
However rendering seems to be broken for other reasons.
This commit is contained in:
Clément Foucault
2025-01-30 14:21:32 +01:00
parent 74b3605be2
commit 6ab4e99cf7

View File

@@ -2284,9 +2284,9 @@ std::string MSLGeneratorInterface::generate_msl_fragment_tile_input_population()
"ivec2(v_in._default_position_.xy)";
out << "\t" << get_shader_stage_instance_name(ShaderStage::FRAGMENT) << "."
<< tile_input.name << " = texelFetch("
<< tile_input.name << " = imageLoad("
<< get_shader_stage_instance_name(ShaderStage::FRAGMENT) << "." << tile_input.name
<< "_subpass_img, " << texel_co << ", 0)." << swizzle << ";\n";
<< "_subpass_img, " << texel_co << ")." << swizzle << ";\n";
}
}
return out.str();