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

METAL GEAR RISING REVENGEANCE flickering UI #345

Closed
Oschowa opened this issue Mar 30, 2019 · 6 comments
Closed

METAL GEAR RISING REVENGEANCE flickering UI #345

Oschowa opened this issue Mar 30, 2019 · 6 comments

Comments

@Oschowa
Copy link

Oschowa commented Mar 30, 2019

The UI in METAL GEAR RISING REVENGEANCE flickers with nine but renders correctly with wined3d. I tested with proton 4.2, nine-standalone 0.5-dev-git, Mesa 19.0 (LLVM7) on a RX580.
I also recorded an apitrace which shows the problem:
https://drive.google.com/open?id=11RvjyaBxO7Rs98-7dWxmAV9SZ2MR7yqP

@Oschowa
Copy link
Author

Oschowa commented Mar 31, 2019

After getting 32bit Mesa builds working, I also tested 18.2.8 and 18.3.5 but the issue stays the same.

@iiv3
Copy link

iiv3 commented Mar 31, 2019

I can reproduce the bug on r600 and with csmt_force=0.

I'll try some older mesa packages later, in case it is a regression.

@iiv3
Copy link

iiv3 commented Apr 2, 2019

It is a regression, but quite an old one. Mesa-13.0.6 is working ok, while Mesa-17.0.7 is not.
There are no 14, 15 and 16 major versions. There are however quite many Nine commits between these versions.

I'm trying to git bisect between both versions, however LLVM seems to cause issues.
(my r600 driver doesn't need LLVM. Mesa-17.0.7 compiles without gallium-llvm, but 17.0.0 fails without it (in nine, none the less). The fail is at linking stage and I suspect that it might be gcc/g++ ABI issue. Newer LLVM package cause compilation problems and that needs tweaking at each step. I'm not compiling my own LLVM.)

I'll keep trying.

@Oschowa
Copy link
Author

Oschowa commented Apr 2, 2019

Looks like radeonsi should build with LLVM 4 or 3.9 for both Mesa 13 and 17. If you don't beat me to it, I'll try to get those builds working in the next few days.

@iiv3
Copy link

iiv3 commented Apr 2, 2019

Bisecting landed me on:
[0ec4e5f630ed68ece3f176b174cfd66eff023904] st/nine: Dirty MANAGED buffers at Lock time

Reverting it in git-master seems to fix the trace.

@Oschowa
Copy link
Author

Oschowa commented Apr 2, 2019

I can confirm, reverting this commit on master fixes this issue for radeonsi aswell, thanks for the bisect!

axeldavy added a commit that referenced this issue Apr 4, 2019
When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 4, 2019
Improve nine_state_clear by calling
NineBindBufferToDevice and NineBindTextureToDevice
instead of nine_bind for buffers and textures.
This fixes the bind count for them.

To simplify (and because we need a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 4, 2019
When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 4, 2019
Improve nine_state_clear by calling
NineBindBufferToDevice and NineBindTextureToDevice
instead of nine_bind for buffers and textures.
This fixes the bind count for them.

To simplify (and because we need a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 12, 2019
When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 12, 2019
Improve nine_state_clear by calling
NineBindBufferToDevice and NineBindTextureToDevice
instead of nine_bind for buffers and textures.
This fixes the bind count for them.

To simplify (and because we need a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 27, 2019
When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 27, 2019
Improve nine_state_clear by calling
NineBindBufferToDevice and NineBindTextureToDevice
instead of nine_bind for buffers and textures.
This fixes the bind count for them.

To simplify (and because we need a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 27, 2019
When a draw call is emited, buffers in the
device->update_buffers list are uploaded.

This patch removes buffers from the list if they
are not bound anymore.

Behaviour found studying:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
axeldavy added a commit that referenced this issue Apr 27, 2019
Previously nine_state_clear was not using
NineBindBufferToDevice and NineBindTextureToDevice
to unbind buffers and textures (but used nine_bind)

This was resulting in an uncorrect bind count for these
resources.

Combined with
0ec4e5f
Some buffers were scheduled to be uploaded directly
after they were locked (because the bind count incorrectly
assumed they were needed for the next draw call),
which resulted in uploads before the data was written.

To simplify a bit the code (and because I needed to
add a pointer to device),
remove the stateblock usage from nine_state_clear and
rename to nine_device_state_clear.

Fixes:
#345

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
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

No branches or pull requests

2 participants