• Zebediah Figura's avatar
    wined3d: Submit command buffers after 512 draw or dispatch commands. · cb723c6d
    Zebediah Figura authored
    This improves performance for the game "Grounded", on a AMD Radeon RX 6700 XT,
    with radv from Mesa 22.3.6. Testing was done with the "cb_access_map_w" option
    enabled, which also improves performance with the game by itself.
    
    Grounded generally makes about 4000 draw calls per frame, which seems not
    atypical. This change makes it submit at most an extra 8 times per frame, but in
    practice due to WINED3D_PERIODIC_SUBMIT_MAX_BUFFERS it submits less (usually
    only 2-3).
    
    The most demanding game I've seen made about 20,000 draw calls per frame, at
    which point the overhead of adapter_vk_draw_primitive() itself becomes a serious
    bottleneck. For such a game we would submit 40 more times per frame with these
    settings, although WINED3D_PERIODIC_SUBMIT_MAX_BUFFERS means we would likely
    submit less than that. In any case if submission itself becomes a bottleneck, we
    should offload it to a separate thread.
    
    Credit goes to Philip Rebohle and his work on DXVK for helping me to notice that
    periodic submission might make a difference.
    cb723c6d
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE.md Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...