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

Add support for vertex state programs (VSP) #16

Merged
merged 5 commits into from
Jul 9, 2017

Conversation

JayFoxRox
Copy link
Member

@JayFoxRox JayFoxRox commented Jul 8, 2017

This is the first step towards better vertex shader support.
It will allow for testing and researching vertex shaders in the future.

Some changes are necessary / wise:

  • pbkit internal functions are exposed so it's possible to wait for the GPU to be idle (necessary for reading PGRAPH RDI to verify VSP results)
  • The shader config for the vertex programs in vp20compiler was changed to represent the NV2A
  • Error output has been added so shaders are debuggable better
  • Removal of assert(false); for GL_VERTEX_STATE_PROGRAM_NV and addition of constant writes
  • Addition of nv2a registers for launch programs / VSPs in pbkit

Issues to be created after merge (as these were not too easy to test until now and still need a bit of work / research / discussion):

  • Confirm R12 still works correctly (is it writeable in our implementation?)
  • Confirm if index for constant writes is correct (also check if relative indexing through A0.x works; with stand-alone indexed writes and if two things happen at once: indexed read + indexed write)
  • Should constant indexing work from 0 to 192 or from -96 to +95? (What happens in the different GPU modes?)

Done (Issues 17 to 19)

#define NV20_TCL_PRIMITIVE_3D_SHADER_SUBTYPE 0x00001e98
#define SHADER_SUBTYPE_REGULAR 0 //not allowed to write into constants: faster
#define SHADER_SUBTYPE_WRITE 1 //can write into constants: slower?!
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change tabs to spaces?
(existing code used tabs, but it looks like a giant mess)

@espes espes merged commit fc8b318 into XboxDev:master Jul 9, 2017
@JayFoxRox JayFoxRox deleted the xbox-vs branch July 9, 2017 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants