<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - swr software rasterizer fall back to OpenGL 2.1"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110252">110252</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>swr software rasterizer fall back to OpenGL 2.1
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>19.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/swr
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>wanghaipeng03@baidu.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>glGetString(GL_EXTENSIONS) returns no GL_EXT_framebuffer_sRGB, which is
required by OpenGL 3.0 (src/mesa/main/version.c compute_version)。so
glGetString(GL_VERSION) fall back to OpenGL 2.1。

#include <stdio.h>
#include <stdlib.h>

#define GL_GLEXT_PROTOTYPES
#include <GL/osmesa.h>
//#include <GL/glext.h>

// settings
const unsigned int SCR_WIDTH = 960;
const unsigned int SCR_HEIGHT = 562;

int main(void) {
  OSMesaContext ctx;
  ctx = OSMesaCreateContextExt(OSMESA_RGBA, 16, 0, 0, NULL);
  GLubyte *buffer = malloc(SCR_WIDTH * SCR_HEIGHT * 4 * sizeof(GLubyte));
  OSMesaMakeCurrent(ctx, buffer, GL_UNSIGNED_BYTE, SCR_WIDTH, SCR_HEIGHT);

  printf("GL_RENDERER = %s\n", (char*)glGetString(GL_RENDERER));
  printf("GL_VERSION = %s\n", (char*)glGetString(GL_VERSION));
  printf("GL_VENDOR = %s\n", (char*)glGetString(GL_VENDOR));
  printf("GL_SHADING_LANGUAGE_VERSION = %s\n",
(char*)glGetString(GL_SHADING_LANGUAGE_VERSION));
  printf("GL_EXTESIONS = %s\n", (char*)glGetString(GL_EXTENSIONS));

  return 0;
}</pre>
        </div>
      </p>


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

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