Metal: Fix framebuffer hash ignoring sampleCount (#3140)

This commit is contained in:
Robin Allen 2023-07-22 02:03:30 +01:00 committed by GitHub
parent c8f6d89f88
commit 506da0443c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3526,7 +3526,10 @@ BX_STATIC_ASSERT(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNa
);
}
murmur.add(1); // SampleCount
const TextureMtl &firstTexture = s_renderMtl->m_textures[_attachment[0].handle.idx];
const uint32_t msaaQuality = bx::uint32_satsub( (firstTexture.m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
const int32_t sampleCount = s_msaa[msaaQuality];
murmur.add(sampleCount);
m_pixelFormatHash = murmur.end();
}