Bug 110252 - swr software rasterizer fall back to OpenGL 2.1
Summary: swr software rasterizer fall back to OpenGL 2.1
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/swr (show other bugs)
Version: 19.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-27 06:24 UTC by Haipeng Wang
Modified: 2019-06-07 16:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Haipeng Wang 2019-03-27 06:24:17 UTC
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;
}
Comment 1 Alok Hota 2019-04-10 16:22:57 UTC
Thanks for reporting this, and for the sample program. We are looking into this.
Comment 2 Krzysztof Raszkowski 2019-06-06 17:13:42 UTC
Fixed in 19.0.6: https://www.mesa3d.org/relnotes/19.0.6.html
Comment 3 Emil Velikov 2019-06-07 16:11:19 UTC
Closing at of last comment. Suspecting that the issue was resolved by commit
"meson: expose glapi through osmesa" which landed in Mesa 19.0.5.

Feel free to reopen if the issue persists.


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.