[Intel][OpenGL] Fail to get correct stencil data from the stencil attachment with glReadPixels()
On latest Intel Mesa Intel OpenGL driver we always fail to get correct stencil value from a stencil attachment with glReadPixel().
Steps to reproduce:
-
Download and unzip OpenGL_test.zip.
-
cd OpenGL_test/ and run ./test or build it from the attached source file by command "gcc -o test test.c -lX11 -lepoxy".
On Ubuntu 20.04 using Intel GPU (UHD630 and HD630) and Intel open-source Mesa driver: Mesa 21.0.0-devel (git-eba97645) and Mesa 20.0.8, we can see the following output (wrong):
GLError after glCopyImageSubData: 0
GLError after glReadPixels: 0
255 255 255 255
255 255 255 255
255 255 255 255
255 255 255 255
GLError after glMapBufferRange: 0
While on AMD GPU and NVidia GPU on both Linux and Windows, we can see the correct output:
GLError after glCopyImageSubData: 0
GLError after glReadPixels: 0
1 1 1 1
1 1 1 1
3 3 1 1
3 3 1 1
GLError after glMapBufferRange: 0