<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Euro Truck Simulator 2 crashes when changing graphics settings with mesa 17.3.0, but not with 17.0.7"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102316#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Euro Truck Simulator 2 crashes when changing graphics settings with mesa 17.3.0, but not with 17.0.7"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102316">bug 102316</a>
              from <span class="vcard"><a class="email" href="mailto:andriy.khulap@globallogic.com" title="Andriy Khulap <andriy.khulap@globallogic.com>"> <span class="fn">Andriy Khulap</span></a>
</span></b>
        <pre>When changing graphics settings, this game calls glXChooseFBConfig() function
with the following attributes:
   tag=32785 val=1  GLX_RENDER_TYPE
   tag=32786 val=1  GLX_X_RENDERABLE
   tag=5     val=1  GLX_DOUBLEBUFFER
   tag=12    val=24 GLX_DEPTH_SIZE
   tag=13    val=8  GLX_STENCIL_SIZE
   tag=8     val=8  GLX_RED_SIZE
   tag=9     val=8  GLX_GREEN_SIZE
   tag=10    val=8  GLX_BLUE_SIZE
   tag=11    val=8  GLX_ALPHA_SIZE
   tag=8370  val=1  GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
glXGetFBConfigs() returns 88 possible configurations in my case, but they all
not sRGB-cabable (.sRGBCapable=0). So they all considered incompatible and
glXChooseFBConfig() returns NULL and zero list size.

Next, function glXChooseVisual() is called with the following attributes:
   tag=1    val=4  GLX_USE_GL
   tag=4    val=5  GLX_RGBA
   tag=5    val=12 GLX_DOUBLEBUFFER
   tag=12   val=24 GLX_DEPTH_SIZE
   tag=13   val=8  GLX_STENCIL_SIZE
   tag=8    val=8  GLX_RED_SIZE
   tag=9    val=8  GLX_GREEN_SIZE
   tag=10   val=8  GLX_BLUE_SIZE
   tag=11   val=8  GLX_ALPHA_SIZE
   tag=8370 val=0  GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
With sRGBCapable=0 it returns valid XVisualInfo*:
   visualList=0xcb30d10
   visualList->visual=0x368bca0
   visualList->visualid=32
   visualList->screen=0
   visualList->depth=24
   visualList->class=4
   visualList->red_mask=ff0000
   visualList->green_mask=ff00
   visualList->blue_mask=ff
   visualList->colormap_size=256
   visualList->bits_per_rgb=8
But the game crashes after this.

Without the check from 6e06e281c6ee (MATCH_DONT_CARE(sRGBCapable);), the
glXChooseFBConfig() function returns 14 compatible configurations and game
operates normally.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>