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
VertexLoader: Skip vertices with index = -1 #1269
Conversation
"this would require a huge redesign of the vertex loader." Why? |
@neobrain I'm not pretty sure what happens after a skipped vertex. Will this vertex just be skipped, or will a new strip start with the next vertex? With the first way, the vertex loader may just have to return the amount of skipped vertices, but the second one needs to inline the index generator for splitting strips :/ |
@degasus my understanding is that the vertex will simply be skipped, as if it had not been uploaded in the first place. |
In any case, please don't speak about "this will require huge redesigns" (justifying the introduction of an ugly hack into our code base) when it apparently is not even clear how the feature is expected to work in the first place. |
It's still a too big redesign for me. That's why I did create this PR, to fix my regression: https://code.google.com/p/dolphin-emu/issues/detail?id=7442 |
@dolphin-emu-bot rebuild |
I made a hwtest which seems to confirm that the individual vertex is skipped (not the primitive, like this PR). I'll send a PR for that repo later, I guess. |
@comex awesome, thank you for confirming that :) |
So, shall we merge this PR? I know it isn't the accurate solution, but it's an easy way to fix the regression in a short-term until the vertex loader is done properly. |
f8567b2
to
a88f12e
Compare
This patches emits NaNs for all position indices with the index -1. This vertices should be skipped, but this would require a huge redesign of the vertex loader. So just emit NaNs which results in skipped primitives. This may be wrong if the winding of strips matters, for quads, ... - but it's still much better than now.
I've added a comment which marks that this is just a hack. |
Leaning on the "let's implement it properly or not at all" side of things. Also, @comex what happened to that hwtest? |
Pinging again; I'm interested in the HWTest too. I'd like this issue fixed for the games affected. |
The hardware test is already done, but I have no idea if it was merged. The result was as expected that this vertices are skipped. So this code is wrong as already declared in my commit message, but it would be a hacky workaround. A good solution would require lots of vertex loader changes imo. I'm going to keep this issue in my mind, but until then, we could either merge this PR or let it as it is. |
PR 1713 has implemented this correctly |
This patches emits NaNs for all position indices with the index -1. This vertices should be skipped, but this would require a huge redesign of the vertex loader. So just emit NaNs which results in skipped primitives.
This may be wrong if the winding of strips matters, for quads, ... - but it's still much better than now.