Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wgpu_hal::dx12 should not allocate a 256KiB buffer just to hold zeroes #5886

Open
jimblandy opened this issue Jun 27, 2024 · 2 comments
Open
Labels
api: dx12 Issues with DX12 or DXGI type: enhancement New feature or request

Comments

@jimblandy
Copy link
Member

jimblandy commented Jun 27, 2024

In wgpu_hal, dx12::Device should not spend 256KiB of GPU memory on Device::zero_buffer, whose only reason for existence is to serve as the source of CopyBufferRegion calls in <dx12::Device as CommandEncoder>::clear_buffer.

It seems like the only other feasible way to zero a buffer in Direct3D 12 is with a compute shader.

@jimblandy jimblandy changed the title wgpu_hal::dx12 should not allocate a 256MiB buffer just to hold zeroes wgpu_hal::dx12 should not allocate a 256KiB buffer just to hold zeroes Jun 27, 2024
@jimblandy
Copy link
Member Author

Correction - it's only 256KiB, not 256MiB.

@teoxoy teoxoy added type: enhancement New feature or request api: dx12 Issues with DX12 or DXGI labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dx12 Issues with DX12 or DXGI type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants