HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.86k stars 194 forks source link

Horizon Zero Dawn: Low resolution textures fixed with VKD3D_CONFIG=no_upload_hvv #992

Open kscherer opened 2 years ago

kscherer commented 2 years ago

The game runs well but looks terrible due to low resolution textures.

Ubuntu 21.04 kernel 5.13.0 RADV 21.2.2 (same issue with RADV 22) GPU: RX 580 4GB - Medium graphics With SMAA (no motion blur). Same issue with upscaling. Proton-GE 7.1-GE-2 (Same issue with Proton Experimental and previous Proton GE versions 7.0rc and 6.21)

I actually get better performance (35 fps vs 45 fps) in the benchmark with VKD3D_CONFIG=no_upload_hvv

Got the hint to try this option from Issue #864 because Death Stranding uses the same engine as HZD

HZD_no_upload_hvv_2 HZD_map_texture

HansKristian-Work commented 2 years ago

Not too surprising if trying to use HVV makes it so that budget is pushed way too low. 4 GB VRAM isn't helping here.

doitsujin commented 2 years ago

Maybe we should restrict HVV usage to RBAR-enabled GPUs with ≥8GB of vram and limit the amount to allocate from it further?

Although this should be transparent to the application since our own allocations shouldn't affect the budget reported by the same process, so not sure why the blurry textures are happening.

HansKristian-Work commented 2 years ago

It will be allocated in DEVICE_LOCAL, so it should affect the budget. I guess we can try just having non-HVV default for 4GB in general, there doesn't seem to be any tangible benefit anyways.

kscherer commented 2 years ago

Yes it seems obvious in hindsight but it took me a long time to find the right option. I wish I could buy a GPU with more VRAM at a reasonable price. Even the new GPUs like the RX6500 have 4GB VRAM and almost same performance as RX580. Hopefully this helps others out there with low VRAM GPUs.

doitsujin commented 2 years ago

It will be allocated in DEVICE_LOCAL, so it should affect the budget. I guess we can try just having non-HVV default for 4GB in general, there doesn't seem to be any tangible benefit anyways.

Isn't the whole point of the budget that allocations made by the same process do not affect the reported budget?

Edit: I guess there might be an issue here since DXGI and D3D12 use different Vulkan instances.... might need to change DXGI to not use VK_EXT_memory_budget then and just always report the full heap size or something.