You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Flutter GPU] Expose the maximum render target size on GpuContext #196642
An app using Flutter GPU that renders into large textures, such as an atlas, can't find out how large a render target the device supports. OpenGL ES only guarantees 2048, while most GPUs support 8192 or more, so today the app either hard-codes a conservative size or creates a texture and finds out by failing, which on some drivers isn't reported cleanly.
Impeller already knows this limit (Capabilities::GetMaximumRenderPassAttachmentSize()), but GpuContext doesn't expose it.
Proposal
Add GpuContext.maxRenderTargetWidth and GpuContext.maxRenderTargetHeight, reporting that capability:
Vulkan: maxFramebufferWidth and maxFramebufferHeight.
OpenGL ES: GL_MAX_TEXTURE_SIZE.
Metal: the feature set table's maximum texture size.
final context = gpu.gpuContext;
final size =min(desiredSize, min(context.maxRenderTargetWidth, context.maxRenderTargetHeight));
This needs to be in the engine, since a package can't query the backend's limits.
This has come up a couple of times. It should be easy to implement. I've assigned myself and Andy so the engine team doesn't lose it. We can probably make it happen.
This has come up a couple of times. It should be easy to implement. I've assigned myself and Andy so the engine team doesn't lose it. We can probably make it happen.
Activity
puneetkukreja98 commentedon Nov 16, 2026
@spydon Thanks for the proposal request, routing this to team-fluttergpu for further investigation.
gaaclarke commentedon Nov 16, 2026
This has come up a couple of times. It should be easy to implement. I've assigned myself and Andy so the engine team doesn't lose it. We can probably make it happen.
spydon commentedon Nov 16, 2026
@gaaclarke there is an implementation ready in #196640
[Flutter GPU] Expose the maximum render target size (flutter#196640)