agi icon indicating copy to clipboard operation
agi copied to clipboard

Support for Realme X2 Pro

Open PixelyIon opened this issue 4 years ago • 4 comments

Hey there,

I wanted to get in contact with the device OEM (Realme, a subsidiary of BBK Electronics) as denoted in the Device Validation section of the site. This device contains a Qualcomm Snapdragon 855+ which I assume should be similar enough to the Pixel 4's 855 and trivial to add support for.

Thanks in advance, Mark

PixelyIon avatar Sep 15 '20 00:09 PixelyIon

Thanks for the request, Mark! Could you tell us a little more about your intended use of AGI? This sort of information would help make the case for OEMs to add support.

jakon2048 avatar Sep 15 '20 02:09 jakon2048

I work on Nintendo Switch emulation and we're going to embark on GPU emulation soon enough which will be fairly challenging as we're going to run up against a lot of performance limitations for mobile GPUs. In a lot of ways it showcases that mobile devices can deliver some extremely impressive visuals in real-world scenarios given them being utilized correctly and doing that isn't easy. Especially with an API like Vulkan which gives you a lot of control over the GPU but at the same time, if you don't know where you're losing performance it's a futile endeavor.

AGI gives us access to some very crucial performance counters on the GPU (which is a major difference from GAPID as it mainly just gave you an overview of the rendering pipeline rather than actual performance statistics) which allow us to know what exactly might be slow, this is obviously useful in emulation as we know what features to avoid using and allows us to emulate guest features in the most efficient way possible as there's a good bit of quirks in modern GPUs where doing certain rather arbitrary things might lead to degraded performance due to the internal implementation of said features.

I should mention that more than us, it's the game developers who're going to benefit a lot from this as they have full control over their rendering stack and can tune it to work extremely well on mobile. AGI allows them to catch a lot of performance they're losing, a few examples being: not designing their rendering pipelines around the TBRs found in mobile GPUs, a lot of texture cache misses due to unoptimal fetch patterns (where they might be able to optimize data locality by packing in values as components in a texture), drawing past the guard band leading to a lot of primitive clipping, a lot of overdraw for fragments, unoptimal buffer configurations where SSBOs might be used rather than UBOs or even push constants.

All of these aren't just theoretical either but have some very real performance implications and it is imperative to the end that a tool such as AGI exists. Once AGI support is widespread, if an OEM doesn't support it then I'd imagine a good chunk of developers would not buy from them and applications will just not be optimized for their devices. It's in their best interests alongside the developers to offer the end users the best experience possible and AGI is an essential tool in that.

PixelyIon avatar Sep 15 '20 05:09 PixelyIon

Thanks for the rationale! Don't want to leave you hanging: we've reached out to Realme and made some good progress. Will provide an update once the plan is solidified.

jakon2048 avatar Sep 23 '20 02:09 jakon2048

I second this, and there a plan to support more devices from different vendor (Samsung, Xiaomi, One plus etc.)? Cause they also use the Qualcomm SoC. Also, I think that these GPU counters from vendors may help us a lot in tweaking GPU rendering performance, which cannot be done by using GAPID.

chraac avatar Sep 23 '20 02:09 chraac

Hi all, closing this stale issue.

Support for GPU profiling features require implementation from the device itself, not from additional code in AGI. Moving forward, devices should support GPU profiling features if they have the memory bandwidth to do so, and we've added tests to reduce regressions in subsequent Android releases.

ttanatb avatar Jan 23 '23 13:01 ttanatb