Bug 106144 - Max OpenGL window resolution
Summary: Max OpenGL window resolution
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: 18.0
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-20 08:14 UTC by Inad
Modified: 2018-04-24 07:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Inad 2018-04-20 08:14:06 UTC
Hello,

I have a problem creating an OpenGL window greater than 9664 with Gallium / LLVMpipe

* LIBGL_ALWAYS_SOFTWARE=1 glxgears -geometry 9664x2160 works fine

* LIBGL_ALWAYS_SOFTWARE=1 glxgears -geometry 9665x2160 gives an error in segfault

* glxgears -geometry 8064x2160 with Intel DRI works fine

* glxgears -geometry 8065x2160 with Intel DRI causes corruption in the image

With the classic swrast it works correctly.

Thank you
Comment 1 Inad 2018-04-20 08:29:05 UTC
glxgears: /var/tmp/portage/media-libs/mesa-18.0.0/work/mesa-18.0.0/src/gallium/drivers/llvmpipe/lp_state_surface.c:57: llvmpipe_set_framebuffer_state: Assertion `fb->width <= LP_MAX_WIDTH' failed.
Comment 2 Roland Scheidegger 2018-04-20 13:00:13 UTC
Not actually a bug (for llvmpipe), since the announced limit clearly is 8kx8k.
(For intel the limit is 8k as well if you're using a chip older than ivy bridge, otherwise it should be 16k. Not sure why it wouldn't work up to 8192, though.)

Theoretically the limit for llvmpipe could be increased. The reason it isn't right now should be only because the memory for the tiles is allocated statically, and you'd need more for larger sizes which is a waste of memory.
If you want to try, you can increase
LP_MAX_TEXTURE_2D_LEVELS from 14 to 15 in lp_limits.h.
But to ensure safe operation, you need to increase
LP_SCENE_MAX_SIZE from 9MB to about 36MB in lp_scene.h too.

(The reason behind needing more scene memory is because there needs to be enough memory for at least one command block per tile. With 16kx16k, there are of course 4 times as many tiles as with 8kx8k. If there's not enough memory, I'm quite certain it will hang at some point (although 16kx2k should be fine without increase in theory, but there's no way to announced support for something like that) - because if a command covering all of the screen is binned and there's not enough memory to bin it to all tiles, we'll abandon the partially binned command, flush and try again, which will never succeed if there's not enough space for even a single command per bin.)
Comment 3 Inad 2018-04-24 07:23:02 UTC
Thank you very much for your answer, I close the bug
And I try to increase the limits

Thank you


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.