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

Nine doesn't support Software Vertex Processing #98

Open
axeldavy opened this issue Mar 22, 2015 · 4 comments
Open

Nine doesn't support Software Vertex Processing #98

axeldavy opened this issue Mar 22, 2015 · 4 comments

Comments

@axeldavy
Copy link

Nine doesn't implement support for Software Vertex Processing.

#91

@axeldavy
Copy link
Author

axeldavy commented Sep 3, 2016

I found some games that need the feature:

Tron 2.0 has glitches (it has less on wine ogl) because the sw processing enables more constants, and we don't.
The sims2 has a lot of issues (see the wine bug report about it, even wine doesn't have it working)

@axeldavy
Copy link
Author

axeldavy commented Sep 4, 2016

@axeldavy
Copy link
Author

axeldavy commented Sep 13, 2016

So according to the tests, it indicates that when in mixed mode, everything has the extended software processing limitations (you can set more constants, create shaders with more constants, etc), but eventually it should complain at draw call time if you draw with hw and the wrong limitations.

It makes sense for speed to use hw to emulate software vertex processing (because hw can have more constants now).

For ProcessVertices, it is likely better to do really sw processing (to avoid glFinish the hw rendering).
To begin the implementation, it is probably better to start using hw for that as well.

Here is what I think needs to be done:
. Add a flag for sw vs hw limitations for the vs shader. If we detect illegal things for hw, we compile first the "sw" version, instead of the sw version. The difference between "sw" and "hw" will be how the constant buffers are maintained.
. Everytime we use ProcessVertices with a new output buffer combination, we assign a new number to the combination. Use in the vs shader key a few bits to put the 'count' of the combination assigned (the streamout description needs to be provided at compilation). 0 means not streamout.
. Put in the device structure info about whether we are in mixed mode or not
. Return error if draw call with "hw" on, but using illegal constraints.
. Load the correct constant buffers for hw vs sw mode for the vs shader.

I think with these changes, the patches to add the target swvp support should be minimal. Some features will be missing (the fancy clipping features). We will have to consider using real sw for ProcessVertices.

@axeldavy
Copy link
Author

axeldavy commented Oct 1, 2016

software vertex processing is partially implemented now.

Not yet implemented:
. Allows up to 255 blend matrices in ff
. ff and vs 2 shaders in ProcessVertices
. Swvp requires textures to be in the SCRATCH pool. (and thus supports all formats)

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

No branches or pull requests

1 participant