protonscr

[d3d9] ::CheckDeviceMultiSampleType and DecodeMultiSampleType should ideally query per-format multisample support instead of global limits

dxvkclosed d3d9
doitsujin/dxvk#5432 · opened 2026-01-06 by werman · updated 2026-01-12 · 0 comments · github
Wwerman 2026-01-06 github

E.g. on Turnip for Adreno A7XX the global limit is VK_SAMPLE_COUNT_4_BIT because 128b formats don't support VK_SAMPLE_COUNT_8_BIT, but for most formats we support 8x msaa which could be queried via GetPhysicalDeviceImageFormatProperties.

Not exposing 8x msaa is not a big deal, but I have a d3d9 capture in CI that has depth image with 8 samples, and after https://github.com/doitsujin/dxvk/commit/994551ac6b51e283917dc7ccf720877071d8bf17 it fails to create that image.

29 @0 IDirect3DDevice9::CreateDepthStencilSurface(this = 0x149ddc0, Width = 1920, Height = 1080, Format = D3DFMT_D24S8, MultiSample = D3DMULTISAMPLE_8_SAMPLES, MultisampleQuality = 0, Discard
 = TRUE, ppSurface = &0x8a085e8, pSharedHandle = NULL) = D3D_OK
29: warning: failed with 0x8876086c (D3DERR_INVALIDCALL): Invalid call

Error codes