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

NV2A VSH RAW Hazard #232

Open
mborgerson opened this issue May 29, 2019 · 0 comments
Open

NV2A VSH RAW Hazard #232

mborgerson opened this issue May 29, 2019 · 0 comments
Labels
area:video An issue in the GPU (Graphics Processing Unit)

Comments

@mborgerson
Copy link
Member

While hunting down graphical bugs in Halo 2, I observed the following VSH code emitted during the render of a tire on a warthog in Halo 2:

  /* Slot 33: 0x00000000 0x008240C0 0x842A5AFC 0xBC80C848 */
  MAD(R8,xy, R8.wx, c[18].xy, c[18].zw);
  MAD(oT0,xy, R8.wx, c[18].xy, c[18].zw);

This appears to be a clear read-after-write hazard for R8. As a temporary solution to this, I've moved the temporary write to follow the muxed write. We should re-evaluate the vsh generation code to look for other such issues.

qstring_append_fmt(ret, " %s(R%d%s%s);\n",


Before:
tex_bad

After:
tex_good

@mborgerson mborgerson added the area:video An issue in the GPU (Graphics Processing Unit) label May 29, 2019
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