-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor register combiner code #21
base: master
Are you sure you want to change the base?
Conversation
25577ea
to
a1a645d
Compare
I've rebased this on the latest master |
write_mask, write_mask, write_mask); | ||
} else { | ||
assert(ps->flags & PS_COMBINERCOUNT_MUX_MSB); | ||
qstring_append_fmt(ps->code, "sum_in.%s = mix(ab_in.%s, cd_in.%s, %s(r0.a < 0.5));\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is the wrong way around
if (output.muxsum != PS_REGISTER_DISCARD) { | ||
|
||
assert(output.ab_op != PS_COMBINEROUTPUT_AB_DOT_PRODUCT); | ||
assert(output.cd_op != PS_COMBINEROUTPUT_CD_DOT_PRODUCT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment that these might be wrong
|
|
|
Does a lot of smaller changes to bring our implementation closer to NV_register_combiners.
Addressed problems
Clamping in in- and outputsUpstreamedNumber of components for inputs
WTF did I mean by this? vector sizes?
V1R0_SUM flags
Final Combiner G is alphaUpstreamedRe-evaluation of GLSL expressions
Fix broken GLSL in case of MUX, also use correct types and avoid casts if not necessary
Data hazards
Variables might be overwritten before they get used as input because AB, CD and SUM should run in parallel and fill outputs for the next stage.
I've attempted to fix this, but the code is horrible.
This change makes the emulation more accurate and faster.
Many GL errors (possibly conflicting hardware states) are not checked
Someone will eventually have to try each of them.
TODO: