https://bugs.freedesktop.org/show_bug.cgi?id=103412

            Bug ID: 103412
           Summary: gallium/wgl: Another fix to context creation without
                    prior SetPixelFormat()
           Product: Mesa
           Version: 17.2
          Hardware: Other
                OS: Windows (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev@lists.freedesktop.org
          Reporter: frank.rich...@gmail.com
        QA Contact: mesa-dev@lists.freedesktop.org

Created attachment 135000
  --> https://bugs.freedesktop.org/attachment.cgi?id=135000&action=edit
patch: Don't blindly use GetPixelFormat() return value

This is a follow-up to bug 101326.

The patch for that bug blindly took the pixel format index returned by
GetPixelFormat(). However, what's the guarantee that this pixel format index is
actually sensible in the Mesa context, or even a valid index?

Well, none actually. (It's also not an entirely theoretic problem. I received a
crash report where an invalid index is indicated, though I couldn't reproduce
the exact scenario.)

The attached patch fixes the blind usage of the index by computing the proper
Mesa pixel format index from the pixel format description.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to