-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Async glReadPixels() in HeadlessView? #477
Comments
Yes, we should eventually switch to that since it's likely a lot faster. I've skipped implementing that since it was not immediately needed for tests back then. |
After talking with @mikemorris , it's not clear that doing |
/sub |
Tried reimplementing this over in https://github.com/mapbox/mapbox-gl-native/compare/pbo-read-pixels in hopes of alleviating the 1000ms+ GPU hang we've been seeing in This does successfully change Not sure if this is a hardware or GPU driver issue or if we're just stalling the pipeline somehow. We've been consistently reproducing this on a GRID K520 GPU running version 367.27 of the NVIDIA Linux drivers. |
chiming in... are you also seeing the stalls on Intel hardware, @mikemorris? Do you have an easy way to trigger these stalls, so I can take a look myself? |
I tried to track down what's going on but it will require a bit more work. If I switch on debug in Intel Mesa driver it captures the pipeline stall with the following output: That's definitely a problem cause if we have to flush the batchbuffer early that has implications on performance. I'm not seeing other programs dumping anything, so I have to imply that it's a result of a bad stream that mbgl is sending to the hardware. That said I don't think that changing to use PBO will help anything in this case. Somehow the GPU is stalled on a busy buffer object and another technique of downloading pixels won't help out. |
@tiagovignatti Are you seeing the same ~1 second hang I'm describing above, or is this a possible cause that manifests differently on Intel hardware? I'm actually not too familiar with the GPU pipeline - is a stall something that could break unrelated in-progress renders or drop previously queued GL calls? The idea with switch to the async mapbox-gl-native/platform/default/headless_view_glx.cpp Lines 116 to 126 in 5588935
|
I don't think this would drop/break previously GL calls. What I am seeing on Intel is subtle stalls in many subtests of This bug called my attention cause I am seeing really huge stalls (of several seconds!) when running |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
Does this make sense or seem worthwhile @kkaefer?
https://www.opengl.org/discussion_boards/showthread.php/144238-asynchronous-readback-that-call-glReadPixels%28%29-with-PBO?highlight=multithread%2A
The text was updated successfully, but these errors were encountered: