Skip to content

EGL wxGLCanvas: prefer configs without alpha when EGL_ALPHA_SIZE is zero or not specified. #24395

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

Closed
wants to merge 1 commit into from

Conversation

dsa-t
Copy link
Contributor

@dsa-t dsa-t commented Mar 12, 2024

There's an issue with KiCad when using KDE6 on native Wayland with Intel graphics (Mesa 24.0.2, Iris) causing OpenGL buffers to be transparent.

See KiCad issue: https://gitlab.com/kicad/code/kicad/-/issues/17341

Even if EGL_ALPHA_SIZE is not set, when using eglChooseConfig, Mesa sorts the list in such a way that configs with alpha are put at the start, and wx only used the first one. In the sorting order this list looks like this:

     bf lv colorbuffer dp st  ms    vis   cav bi  renderable  supported
  id sz  l  r  g  b  a th cl ns b    id   eat nd gl es es2 vg surfaces 
---------------------------------------------------------------------
0x7a 16  0  5  5  5  1 16  0  0 0 0x00--         y  y  y     win <==== wx picked this one
0x8e 16  0  4  4  4  4 16  0  0 0 0x00--         y  y  y     win
0x7b 16  0  5  5  5  1 24  0  0 0 0x00--         y  y  y     win
0x8f 16  0  4  4  4  4 24  0  0 0 0x00--         y  y  y     win
0x7c 16  0  5  5  5  1 24  8  0 0 0x00--         y  y  y     win
0x90 16  0  4  4  4  4 24  8  0 0 0x00--         y  y  y     win
0x81 16  0  5  5  5  1 16  0  2 1 0x00--         y  y  y     win
0x95 16  0  4  4  4  4 16  0  2 1 0x00--         y  y  y     win
0x85 16  0  5  5  5  1 24  0  2 1 0x00--         y  y  y     win
0x99 16  0  4  4  4  4 24  0  2 1 0x00--         y  y  y     win
0x89 16  0  5  5  5  1 24  8  2 1 0x00--         y  y  y     win
0x9d 16  0  4  4  4  4 24  8  2 1 0x00--         y  y  y     win
0x82 16  0  5  5  5  1 16  0  4 1 0x00--         y  y  y     win
0x96 16  0  4  4  4  4 16  0  4 1 0x00--         y  y  y     win
0x86 16  0  5  5  5  1 24  0  4 1 0x00--         y  y  y     win
0x9a 16  0  4  4  4  4 24  0  4 1 0x00--         y  y  y     win
0x8a 16  0  5  5  5  1 24  8  4 1 0x00--         y  y  y     win
0x9e 16  0  4  4  4  4 24  8  4 1 0x00--         y  y  y     win
0x83 16  0  5  5  5  1 16  0  8 1 0x00--         y  y  y     win
0x97 16  0  4  4  4  4 16  0  8 1 0x00--         y  y  y     win
0x87 16  0  5  5  5  1 24  0  8 1 0x00--         y  y  y     win
0x9b 16  0  4  4  4  4 24  0  8 1 0x00--         y  y  y     win
0x8b 16  0  5  5  5  1 24  8  8 1 0x00--         y  y  y     win
0x9f 16  0  4  4  4  4 24  8  8 1 0x00--         y  y  y     win
0x84 16  0  5  5  5  1 16  0 16 1 0x00--         y  y  y     win
0x98 16  0  4  4  4  4 16  0 16 1 0x00--         y  y  y     win
0x88 16  0  5  5  5  1 24  0 16 1 0x00--         y  y  y     win
0x9c 16  0  4  4  4  4 24  0 16 1 0x00--         y  y  y     win
0x8c 16  0  5  5  5  1 24  8 16 1 0x00--         y  y  y     win
0xa0 16  0  4  4  4  4 24  8 16 1 0x00--         y  y  y     win
0x3e 24  0  8  8  8  0 16  0  0 0 0x00--         y  y  y     win <==== config we want
0x3f 24  0  8  8  8  0 24  0  0 0 0x00--         y  y  y     win
0x40 24  0  8  8  8  0 24  8  0 0 0x00--         y  y  y     win
0x45 24  0  8  8  8  0 16  0  2 1 0x00--         y  y  y     win
0x49 24  0  8  8  8  0 24  0  2 1 0x00--         y  y  y     win
0x4d 24  0  8  8  8  0 24  8  2 1 0x00--         y  y  y     win
0x46 24  0  8  8  8  0 16  0  4 1 0x00--         y  y  y     win
0x4a 24  0  8  8  8  0 24  0  4 1 0x00--         y  y  y     win
0x4e 24  0  8  8  8  0 24  8  4 1 0x00--         y  y  y     win
0x47 24  0  8  8  8  0 16  0  8 1 0x00--         y  y  y     win
0x4b 24  0  8  8  8  0 24  0  8 1 0x00--         y  y  y     win
0x4f 24  0  8  8  8  0 24  8  8 1 0x00--         y  y  y     win
0x48 24  0  8  8  8  0 16  0 16 1 0x00--         y  y  y     win
0x4c 24  0  8  8  8  0 24  0 16 1 0x00--         y  y  y     win
0x50 24  0  8  8  8  0 24  8 16 1 0x00--         y  y  y     win
0x16 30  0 10 10 10  0 16  0  0 0 0x00--         y  y  y     win
0x17 30  0 10 10 10  0 24  0  0 0 0x00--         y  y  y     win
0x18 30  0 10 10 10  0 24  8  0 0 0x00--         y  y  y     win
0x1d 30  0 10 10 10  0 16  0  2 1 0x00--         y  y  y     win
0x21 30  0 10 10 10  0 24  0  2 1 0x00--         y  y  y     win
0x25 30  0 10 10 10  0 24  8  2 1 0x00--         y  y  y     win
0x1e 30  0 10 10 10  0 16  0  4 1 0x00--         y  y  y     win
0x22 30  0 10 10 10  0 24  0  4 1 0x00--         y  y  y     win
0x26 30  0 10 10 10  0 24  8  4 1 0x00--         y  y  y     win
0x1f 30  0 10 10 10  0 16  0  8 1 0x00--         y  y  y     win
0x23 30  0 10 10 10  0 24  0  8 1 0x00--         y  y  y     win
0x27 30  0 10 10 10  0 24  8  8 1 0x00--         y  y  y     win
0x20 30  0 10 10 10  0 16  0 16 1 0x00--         y  y  y     win
0x24 30  0 10 10 10  0 24  0 16 1 0x00--         y  y  y     win
0x28 30  0 10 10 10  0 24  8 16 1 0x00--         y  y  y     win
0x02 32  0 10 10 10  2 16  0  0 0 0x00--         y  y  y     win
0x2a 32  0  8  8  8  8 16  0  0 0 0x00--         y  y  y     win
0x03 32  0 10 10 10  2 24  0  0 0 0x00--         y  y  y     win
0x2b 32  0  8  8  8  8 24  0  0 0 0x00--         y  y  y     win
0x04 32  0 10 10 10  2 24  8  0 0 0x00--         y  y  y     win
0x2c 32  0  8  8  8  8 24  8  0 0 0x00--         y  y  y     win
0x09 32  0 10 10 10  2 16  0  2 1 0x00--         y  y  y     win
0x31 32  0  8  8  8  8 16  0  2 1 0x00--         y  y  y     win
0x0d 32  0 10 10 10  2 24  0  2 1 0x00--         y  y  y     win
0x35 32  0  8  8  8  8 24  0  2 1 0x00--         y  y  y     win
0x11 32  0 10 10 10  2 24  8  2 1 0x00--         y  y  y     win
0x39 32  0  8  8  8  8 24  8  2 1 0x00--         y  y  y     win
0x0a 32  0 10 10 10  2 16  0  4 1 0x00--         y  y  y     win
0x32 32  0  8  8  8  8 16  0  4 1 0x00--         y  y  y     win
0x0e 32  0 10 10 10  2 24  0  4 1 0x00--         y  y  y     win
0x36 32  0  8  8  8  8 24  0  4 1 0x00--         y  y  y     win
0x12 32  0 10 10 10  2 24  8  4 1 0x00--         y  y  y     win
0x3a 32  0  8  8  8  8 24  8  4 1 0x00--         y  y  y     win
0x0b 32  0 10 10 10  2 16  0  8 1 0x00--         y  y  y     win
0x33 32  0  8  8  8  8 16  0  8 1 0x00--         y  y  y     win
0x0f 32  0 10 10 10  2 24  0  8 1 0x00--         y  y  y     win
0x37 32  0  8  8  8  8 24  0  8 1 0x00--         y  y  y     win
0x13 32  0 10 10 10  2 24  8  8 1 0x00--         y  y  y     win
0x3b 32  0  8  8  8  8 24  8  8 1 0x00--         y  y  y     win
0x0c 32  0 10 10 10  2 16  0 16 1 0x00--         y  y  y     win
0x34 32  0  8  8  8  8 16  0 16 1 0x00--         y  y  y     win
0x10 32  0 10 10 10  2 24  0 16 1 0x00--         y  y  y     win
0x38 32  0  8  8  8  8 24  0 16 1 0x00--         y  y  y     win
0x14 32  0 10 10 10  2 24  8 16 1 0x00--         y  y  y     win
0x3c 32  0  8  8  8  8 24  8 16 1 0x00--         y  y  y     win

GLFW, for example, either uses the EGL_EXT_present_opaque extension, or if not available,
filters out configs with alpha.


Config list (EGL_LOG_LEVEL=debug, requested depth=8)

libEGL debug: ---------------
libEGL debug: Configurations:
libEGL debug: cho       bf lv colourbuffer dp st  ms           vis  cav  bi     renderable           supported
libEGL debug: sen    id sz  l  r  g  b  a  th cl ns b           id  eat  nd  gl es es2 es3 vg         surfaces
libEGL debug: ---------------
libEGL debug:     0x001 32  0 10 10 10  2   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  60 0x002 32  0 10 10 10  2  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  62 0x003 32  0 10 10 10  2  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  64 0x004 32  0 10 10 10  2  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x005 32  0 10 10 10  2   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x006 32  0 10 10 10  2   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x007 32  0 10 10 10  2   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x008 32  0 10 10 10  2   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  66 0x009 32  0 10 10 10  2  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  72 0x00a 32  0 10 10 10  2  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  78 0x00b 32  0 10 10 10  2  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  84 0x00c 32  0 10 10 10  2  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  68 0x00d 32  0 10 10 10  2  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  74 0x00e 32  0 10 10 10  2  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  80 0x00f 32  0 10 10 10  2  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  86 0x010 32  0 10 10 10  2  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  70 0x011 32  0 10 10 10  2  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  76 0x012 32  0 10 10 10  2  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  82 0x013 32  0 10 10 10  2  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  88 0x014 32  0 10 10 10  2  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x015 30  0 10 10 10  0   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  45 0x016 30  0 10 10 10  0  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  46 0x017 30  0 10 10 10  0  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  47 0x018 30  0 10 10 10  0  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x019 30  0 10 10 10  0   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x01a 30  0 10 10 10  0   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x01b 30  0 10 10 10  0   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x01c 30  0 10 10 10  0   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  48 0x01d 30  0 10 10 10  0  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  51 0x01e 30  0 10 10 10  0  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  54 0x01f 30  0 10 10 10  0  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  57 0x020 30  0 10 10 10  0  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  49 0x021 30  0 10 10 10  0  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  52 0x022 30  0 10 10 10  0  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  55 0x023 30  0 10 10 10  0  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  58 0x024 30  0 10 10 10  0  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  50 0x025 30  0 10 10 10  0  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  53 0x026 30  0 10 10 10  0  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  56 0x027 30  0 10 10 10  0  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  59 0x028 30  0 10 10 10  0  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x029 32  0  8  8  8  8   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  61 0x02a 32  0  8  8  8  8  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  63 0x02b 32  0  8  8  8  8  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  65 0x02c 32  0  8  8  8  8  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x02d 32  0  8  8  8  8   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x02e 32  0  8  8  8  8   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x02f 32  0  8  8  8  8   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x030 32  0  8  8  8  8   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  67 0x031 32  0  8  8  8  8  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  73 0x032 32  0  8  8  8  8  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  79 0x033 32  0  8  8  8  8  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  85 0x034 32  0  8  8  8  8  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  69 0x035 32  0  8  8  8  8  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  75 0x036 32  0  8  8  8  8  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  81 0x037 32  0  8  8  8  8  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  87 0x038 32  0  8  8  8  8  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  71 0x039 32  0  8  8  8  8  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  77 0x03a 32  0  8  8  8  8  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  83 0x03b 32  0  8  8  8  8  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  89 0x03c 32  0  8  8  8  8  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x03d 24  0  8  8  8  0   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  30 0x03e 24  0  8  8  8  0  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  31 0x03f 24  0  8  8  8  0  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:  32 0x040 24  0  8  8  8  0  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x041 24  0  8  8  8  0   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x042 24  0  8  8  8  0   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x043 24  0  8  8  8  0   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x044 24  0  8  8  8  0   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  33 0x045 24  0  8  8  8  0  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  36 0x046 24  0  8  8  8  0  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  39 0x047 24  0  8  8  8  0  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  42 0x048 24  0  8  8  8  0  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  34 0x049 24  0  8  8  8  0  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  37 0x04a 24  0  8  8  8  0  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  40 0x04b 24  0  8  8  8  0  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  43 0x04c 24  0  8  8  8  0  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  35 0x04d 24  0  8  8  8  0  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  38 0x04e 24  0  8  8  8  0  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  41 0x04f 24  0  8  8  8  0  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  44 0x050 24  0  8  8  8  0  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x051 64  0 16 16 16 16   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x052 64  0 16 16 16 16  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x053 64  0 16 16 16 16  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x054 64  0 16 16 16 16  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x055 64  0 16 16 16 16   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x056 64  0 16 16 16 16   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x057 64  0 16 16 16 16   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x058 64  0 16 16 16 16   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x059 64  0 16 16 16 16  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05a 64  0 16 16 16 16  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05b 64  0 16 16 16 16  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05c 64  0 16 16 16 16  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05d 64  0 16 16 16 16  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05e 64  0 16 16 16 16  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x05f 64  0 16 16 16 16  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x060 64  0 16 16 16 16  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x061 64  0 16 16 16 16  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x062 64  0 16 16 16 16  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x063 64  0 16 16 16 16  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x064 64  0 16 16 16 16  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x065 48  0 16 16 16  0   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x066 48  0 16 16 16  0  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x067 48  0 16 16 16  0  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x068 48  0 16 16 16  0  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x069 48  0 16 16 16  0   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06a 48  0 16 16 16  0   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06b 48  0 16 16 16  0   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06c 48  0 16 16 16  0   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06d 48  0 16 16 16  0  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06e 48  0 16 16 16  0  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x06f 48  0 16 16 16  0  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x070 48  0 16 16 16  0  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x071 48  0 16 16 16  0  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x072 48  0 16 16 16  0  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x073 48  0 16 16 16  0  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x074 48  0 16 16 16  0  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x075 48  0 16 16 16  0  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x076 48  0 16 16 16  0  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x077 48  0 16 16 16  0  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x078 48  0 16 16 16  0  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x079 16  0  5  5  5  1   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   0 0x07a 16  0  5  5  5  1  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   2 0x07b 16  0  5  5  5  1  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   4 0x07c 16  0  5  5  5  1  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x07d 16  0  5  5  5  1   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x07e 16  0  5  5  5  1   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x07f 16  0  5  5  5  1   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x080 16  0  5  5  5  1   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:   6 0x081 16  0  5  5  5  1  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  12 0x082 16  0  5  5  5  1  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  18 0x083 16  0  5  5  5  1  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  24 0x084 16  0  5  5  5  1  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:   8 0x085 16  0  5  5  5  1  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  14 0x086 16  0  5  5  5  1  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  20 0x087 16  0  5  5  5  1  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  26 0x088 16  0  5  5  5  1  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  10 0x089 16  0  5  5  5  1  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  16 0x08a 16  0  5  5  5  1  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  22 0x08b 16  0  5  5  5  1  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  28 0x08c 16  0  5  5  5  1  24  8 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x08d 16  0  4  4  4  4   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   1 0x08e 16  0  4  4  4  4  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   3 0x08f 16  0  4  4  4  4  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:   5 0x090 16  0  4  4  4  4  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x091 16  0  4  4  4  4   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x092 16  0  4  4  4  4   0  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x093 16  0  4  4  4  4   0  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x094 16  0  4  4  4  4   0  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:   7 0x095 16  0  4  4  4  4  16  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  13 0x096 16  0  4  4  4  4  16  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  19 0x097 16  0  4  4  4  4  16  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  25 0x098 16  0  4  4  4  4  16  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:   9 0x099 16  0  4  4  4  4  24  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  15 0x09a 16  0  4  4  4  4  24  0  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  21 0x09b 16  0  4  4  4  4  24  0  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  27 0x09c 16  0  4  4  4  4  24  0 16 1 0x00000000--            y  y   y   y                win,
libEGL debug:  11 0x09d 16  0  4  4  4  4  24  8  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:  17 0x09e 16  0  4  4  4  4  24  8  4 1 0x00000000--            y  y   y   y                win,
libEGL debug:  23 0x09f 16  0  4  4  4  4  24  8  8 1 0x00000000--            y  y   y   y                win,
libEGL debug:  29 0x0a0 16  0  4  4  4  4  24  8 16 1 0x00000000--            y  y   y   y                win,

eglinfo.txt


This is targeted for 3.2 because KiCad is not buildable with wx master.

…ero or not specified.

At least Mesa Iris on Wayland is known to put RGBA5551 and RGBA4444 formats
at the start of the config list, even if we didn't request alpha.
@vadz
Copy link
Contributor

vadz commented Mar 12, 2024

Looks good to me, thanks! @swt2c Any objections to applying this?

This is targeted for 3.2 because KiCad is not buildable with wx master.

What has broken it? I thought it did build with it relatively recently... Please open an issue if there was a backwards incompatible change, TIA!

@vadz vadz added this to the 3.2.5 milestone Mar 12, 2024
else

int requestedAlpha = -1;
for (int i = 0; attrsList[i] != EGL_NONE; i++)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, after looking at this more carefully, I think there is a problem here and this should be

Suggested change
for (int i = 0; attrsList[i] != EGL_NONE; i++)
for (int i = 0; attrsList[i] != EGL_NONE; i += 2)

Shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless one of the "values" is EGL_ALPHA_SIZE, it seems fine. But I agree += 2 makes more sense.

Comment on lines +775 to +776
if (bestConfig == -1)
bestConfig = i;
Copy link
Contributor

@vadz vadz Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shouldn't we break here? As written, this selects the last matching config, while I thought the idea was to select the first one. Oops, no, it doesn't, I misread, but it's still not clear why should we continue iterating after finding a match?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly a leftover after I was printing all configs.

vadz added a commit to vadz/wxWidgets that referenced this pull request Mar 12, 2024
At least Mesa Iris on Wayland is known to put RGBA5551 and RGBA4444
formats at the start of the config list, even if we didn't request
alpha, which is unexpected, so filter them out manually in this case to
ensure we get the expected RGB444, as with the other drivers.

See wxWidgets#24395.

Co-authored-by: Vadim Zeitlin <[email protected]>
@dsa-t
Copy link
Contributor Author

dsa-t commented Mar 15, 2024

What has broken it? I thought it did build with it relatively recently... Please open an issue if there was a backwards incompatible change, TIA!

It's (still) the string conversion stuff.

(30 errors)
kicad-build-log.txt

I'm not sure whether it's best to fix in KiCad or wx. But wrapping everything in wxString() generally doesn't make the code more readable.

vadz added a commit that referenced this pull request Mar 15, 2024
At least Mesa Iris on Wayland is known to put RGBA5551 and RGBA4444
formats at the start of the config list, even if we didn't request
alpha, which is unexpected, so filter them out manually in this case to
ensure we get the expected RGB888, as with the other drivers.

See #24395, #24397.

Co-authored-by: Vadim Zeitlin <[email protected]>
@vadz
Copy link
Contributor

vadz commented Mar 15, 2024

Replaced by #24397, merged now, so closing this one.

What has broken it? I thought it did build with it relatively recently... Please open an issue if there was a backwards incompatible change, TIA!

It's (still) the string conversion stuff.

(30 errors) kicad-build-log.txt

I'm not sure whether it's best to fix in KiCad or wx. But wrapping everything in wxString() generally doesn't make the code more readable.

This is definitely not how I'd fix it, I'd rather just remove wxT() -- it should have never been used here in the first place (so IMO it's clearly a KiCad bug). The only other reasonable alternative is to make entry.first a wxString but I'd consider this only if entry is some UI-only thing.

@vadz vadz closed this Mar 15, 2024
vadz pushed a commit to vadz/wxWidgets that referenced this pull request Mar 22, 2024
At least Mesa Iris on Wayland is known to put RGBA5551 and RGBA4444
formats at the start of the config list, even if we didn't request
alpha, which is unexpected, so filter them out manually in this case to
ensure we get the expected RGB888, as with the other drivers.

See wxWidgets#24395, wxWidgets#24397.

Co-authored-by: Vadim Zeitlin <[email protected]>

(cherry picked from commit ff90bd5)
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

Successfully merging this pull request may close these issues.

2 participants