test(agc): check MSAA storage emission without the device's support

PrepareMultisampledStorage only inspects the SPIR-V that the recompiler
emits for multisampled storage writes and atomics, but it took its
target from the device, so on a device without
shaderStorageImageMultisample, such as MoltenVK, the emission failed
and agc_driver_prepared_shaders failed in all its variants. The target
now has the StorageImageMultisample capability, and the check that a
target without it is refused still removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Arvind Frøiland 2026-10-09 14:06:13 +09:00
parent f145139676
commit 7fc025e1c8
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,9 @@ void PrepareMultisampledStorage(AgcDriver::VulkanDevice& device) {
request.context.waveSize = 32;
request.context.compute = ShaderComputeStageInfo{{8, 8, 1}, 0, {true, true, false}, false, 2, {}};
request.target = device.ComputeTarget(32);
std::vector<std::uint32_t> multisampleCapabilities(request.target.supportedCapabilities.begin(), request.target.supportedCapabilities.end());
if (std::ranges::find(multisampleCapabilities, spv::CapabilityStorageImageMultisample) == multisampleCapabilities.end()) multisampleCapabilities.push_back(spv::CapabilityStorageImageMultisample);
request.target.supportedCapabilities = multisampleCapabilities;
request.layout.pushConstantSizeBytes = 128;
request.useCache = false;
for (std::uint32_t variant = 0; variant < 5; ++variant) {