anv: Store host-located copy of NULL surface state for faster memcpy
Profiling the replay of the affected capture from the issue, I found that ~85% of time is spent on line memcpy(plane_map, device->null_surface_state.map, ANV_SURFACE_STATE_SIZE);
in anv_descriptor_set_write_image_view
.
My guess that it's due to the fact that null_surface_state is stored in VRAM, and repeatedly reading from it takes a lot of time.
When replaced with copy from host-local memory, anv_descriptor_set_write_image_view
effectively disappears from the profile, and RenderDoc replay takes ~1 second.
The game itself also seems to load a bit faster, though it displays a lot of run-to-run variance, and I have no idea how to measure it objectively :)
Closes: #10594 (closed)
P.S. Not sure if I should cc: stable
it? This is an optimization, and not a fix after all.