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

Check VertexShader instruction count #45

Merged
merged 2 commits into from
Sep 10, 2017

Conversation

elishacloud
Copy link
Contributor

@elishacloud elishacloud commented Sep 9, 2017

This update will check the VertexShader instruction count before adding any more instructions to the shader to ensure that the count never exceeds 128 instructions. This will fix the issue with d3d8to9 and BloodRayne/BloodRayne 2. See comments on these two threads:

A few notes here:

  1. Initialization of the output registers are not always needed because sometimes (like the case with BloodRayne) they are already initialized in the existing VertexShader from the game.
  2. It seems that only initialization of the oT (Texture Coordinate) register is actually needed. I have not found a case where initialization of the other registers are needed. The ENBDev DX8 to DX9 convertor only initializes the oT (Texture Coordinate) register. See comments here.

Check VertexShader instruction count before adding any more instructions
to the shader to ensure that the count never exceeds 128 instructions.
Move the initialization of oT register to happen first since this is the
most important and needs to be done before InstructionCount is depleted.
@crosire crosire merged commit 80b66d4 into crosire:master Sep 10, 2017
@elishacloud elishacloud deleted the VertexShader-Instruction-Count branch September 16, 2017 18:14
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

Successfully merging this pull request may close these issues.

2 participants