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

Vertex program EXP behaviour does not respect our ARL-hack #105

Open
JayFoxRox opened this issue Sep 3, 2018 · 0 comments
Open

Vertex program EXP behaviour does not respect our ARL-hack #105

JayFoxRox opened this issue Sep 3, 2018 · 0 comments
Labels
area:video An issue in the GPU (Graphics Processing Unit)

Comments

@JayFoxRox
Copy link
Member

JayFoxRox commented Sep 3, 2018

From 2.14.1.11 (Vertex Program Floating Point Requirements):

The floor operations used by the ARL and EXP instructions must
operate identically. Specifically, the EXP instruction's floor(t.x)
intermediate result must exactly match the integer stored in the
address register by the ARL instruction.

Also see #79 for our current hack, which breaks this assumption.
Although I can't think of an example algorithm, having these in sync could be very critical, so we should respect this (there's probably good a reason why the spec is so specific).

I suggest adding our own biased_floor function or global constant for the bias (maybe pick a better name which respects our GLSL style), and using it in ARL and EXP.

Please also think about cases where our bias might run into problems (I worry about the result.y line because it might break assumption about returning [0.0;1.0[ ), so we can review the use of a bias or change it's value to avoid those problems.
So if it would break assumptions, we might have to add the bias to src for all operations in EXP.

The LOG function, the counter-part to EXP, is probably affected by this too.

@JayFoxRox JayFoxRox added the area:video An issue in the GPU (Graphics Processing Unit) label Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:video An issue in the GPU (Graphics Processing Unit)
Projects
None yet
Development

No branches or pull requests

1 participant