gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.36k stars 547 forks source link

Sparse (tiled) resources for Vulkan and DirectX 12 #3521

Closed deprilula28 closed 3 years ago

deprilula28 commented 3 years ago

Progress in implementing sparse resources, listed on issue #1610

This PR adds the following:

Remaining additions:

PR checklist:

deprilula28 commented 3 years ago

I've been looking until now and have no idea why metal is failing. If someone can review that for me I would be grateful.

kvark commented 3 years ago

You can grab https://github.com/kvark/gfx/commit/9f37e23ec118f38d8cf4f777c3c35634b5d10ae2 for the metal fix Please squash everything when ready.

kvark commented 3 years ago

Please address the concern about sparselybound feature (i.e. remove the feature), and squash the changes to proceed.

deprilula28 commented 3 years ago

I think I did that right, I'm sorry I'm not that experienced with doing PRs

kvark commented 3 years ago

@deprilula28

This branch cannot be rebased due to conflicts

Also, please squash the commits after rebase!

kvark commented 3 years ago

Given that this is very advanced, I'm also wondering if some of the methods should just have a default implementation that is unimplemented!(). This would say quite some boilerplate in the backends.

Neo-Zhixing commented 3 years ago

What is the status on this PR? Is this still moving forward?

deprilula28 commented 3 years ago

I've been busy and forgot about this, but there shouldn't be that much left

kvark commented 3 years ago

@deprilula28 we've done a massive API simplification pass when releasing 0.7, and this PR needs to be updated accordingly. There is no Borrow or IntoIterator in the API any more.

deprilula28 commented 3 years ago

Are those the only changed needed?

kvark commented 3 years ago

Yeah, I think the other question I had if it would be nicer to have the default implementations for the new methods, since they aren't implemented for most backends yet, anyway. But that's not something I feel strongly about - basically implementors (yours) choice here. And a rebase, of course:)

deprilula28 commented 3 years ago

I have removed the goal for an OpenGL implementation as the extension is rarely supported and doesn't exist on WebGL

deprilula28 commented 3 years ago

@kvark I'm not sure this is how you would rather I do it, it does break the API for create_buffer

deprilula28 commented 3 years ago

I have absolutely no idea what happened I didn't touch .gitignore lol

kvark commented 3 years ago

This branch cannot be rebased due to conflicts

deprilula28 commented 3 years ago

How do I get to see the conflicts?

kvark commented 3 years ago

I recommend first squashing everything into one commit, then doing git pull -r upstream master, where "upstream" is associated with this remote.

Neo-Zhixing commented 3 years ago

@deprilula28 You don't get to see the conflicts because you're trying to merge. Git rebase works a bit differently and if you rebase to master it'll ask you to resolve all the conflicts again. Here's an easier way to do this:

Assuming your working copy is clean:

git merge upstream/master
git reset upstream/master
git add *
git commit

I've tested, this should give you a single beautifully squashed commit attached to upstream/master.

Thank you for your work!

bors[bot] commented 3 years ago

Build succeeded: