• Zebediah Figura's avatar
    wined3d: Implement a copy-on-write scheme for whole buffer uploads. · c6b9aa7a
    Zebediah Figura authored
    For discard maps on deferred contexts, we currently blit from the upload buffer
    to the resource. This is necessary because command lists can be reused and
    submitted multiple times—we cannot simply have the buffer take ownership, as for
    discard maps on immediate contexts.
    
    However, it is very common for applications to use command lists only once
    before throwing them away—in essence taking advantage of the feature only for
    the multithreading advantages it allows.
    
    Therefore we take advantage of this pattern by trying to rename the buffer
    anyway. In order to do this we introduce a refcount for BO pointers. When
    writing to a buffer BO, we first check whether the buffer "owns" the BO—i.e.
    whether it has a refcount of 1—and if not, we create a new BO for the buffer and
    copy the contents of the old BO to the new BO. That is, we perform
    mostly-transparent copy-on-write.
    
    This improves performance, and reduces CPU usage, in Assassin's Creed: Unity.
    c6b9aa7a
Name
Last commit
Last update
..
Makefile.in Loading commit data...
adapter_gl.c Loading commit data...
adapter_vk.c Loading commit data...
arb_program_shader.c Loading commit data...
ati_fragment_shader.c Loading commit data...
buffer.c Loading commit data...
context.c Loading commit data...
context_gl.c Loading commit data...
context_vk.c Loading commit data...
cs.c Loading commit data...
device.c Loading commit data...
directx.c Loading commit data...
gl_compat.c Loading commit data...
glsl_shader.c Loading commit data...
nvidia_texture_shader.c Loading commit data...
palette.c Loading commit data...
query.c Loading commit data...
resource.c Loading commit data...
sampler.c Loading commit data...
shader.c Loading commit data...
shader_sm1.c Loading commit data...
shader_sm4.c Loading commit data...
shader_spirv.c Loading commit data...
state.c Loading commit data...
stateblock.c Loading commit data...
surface.c Loading commit data...
swapchain.c Loading commit data...
texture.c Loading commit data...
utils.c Loading commit data...
version.rc Loading commit data...
vertexdeclaration.c Loading commit data...
view.c Loading commit data...
wined3d.spec Loading commit data...
wined3d_gl.h Loading commit data...
wined3d_main.c Loading commit data...
wined3d_private.h Loading commit data...
wined3d_shaders.h Loading commit data...
wined3d_vk.h Loading commit data...