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

Relax the buffer role change restrictions in GL #3508

Open
kvark opened this issue Dec 3, 2020 · 0 comments
Open

Relax the buffer role change restrictions in GL #3508

kvark opened this issue Dec 3, 2020 · 0 comments

Comments

@kvark
Copy link
Member

kvark commented Dec 3, 2020

I think the index_buffer_role_change restriction should still allow transfers (i.e. TRANSFER_XXX). Here are the steps to get there:

First, in add_memory_type function we'd need to have something like:

let restricted_usage = buffer::Usage::INDEX | buffer::Usage::TRANSFER_SRC | buffer::Usage::TRANSFER_DST;
memory_types.push((memory_type, MemoryUsage::Buffer(restricted_usage)));
memory_types.push((
    memory_type,
    MemoryUsage::Buffer(buffer::Usage::all() - restricted_usage),
));

Secondly, in queue.rs when CopyBufferToBuffer and friends are implemented, they need to respect the bind points of the buffers. Currently, they use COPY_READ_BUFFER and COPY_WRITE_BUFFER unconditionally. Instead, these would need to be passed in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant