panfrost: implement line smoothing
- I use config_attribs for egl eglChooseConfig
const EGLint config_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 1,
EGL_GREEN_SIZE, 1,
EGL_BLUE_SIZE, 1,
EGL_ALPHA_SIZE, 0,
EGL_DEPTH_SIZE, 1,
EGL_STENCIL_SIZE, 1,
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
EGL_SAMPLES, 0,
EGL_NONE
};
and then enable GL_BLEND and GL_LINE_SMOOTH, and then draw an anti aliasing effect line, but it didn't work :
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
The same code works on other platforms , For example, AMDGPU
-
if EGL_SAMPLES set as 1,anti aliasing effect works,but severe performance degradation
-
if EGL_ALPHA_SIZE set as 1, eglChooseConfig may failed
-
test on mali T860/G52, mesa21.2.6, mesa23.1.4
Edited by lihongtao