It seems under some GPU/profile, GL_INVALID_ENUM is generated
instead of GL_INVALID_VALUE for unsupported internal format.
This is even conflicted in reference documents. Just handle
them at same time.
From:
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
GL_INVALID_ENUM is generated if internalFormat is not one of the accepted
resolution and format symbolic constants.
From:
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
GL_INVALID_VALUE is generated if internalFormat is not one of the accepted
resolution and format symbolic constants.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This along with another patch allows us to expose
GL_[EXT|ARB]_framebuffer_sRGB on a GLES host.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Use GL_RG based formats with a swizzle to implement virgl
luminance/alpha formats. Since GL_RG is color renderable this patch
allows more operations to be implemented for virgl luminance/alpha
formats.
Fixes:
dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_nicest
dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_fastest
dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_nicest
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Use GL_RED based formats with a swizzle to implement virgl luminance
formats. Since GL_RED is color renderable this patch allows more
operations to be implemented for virgl luminance formats.
Fixes:
dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_nicest
dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_fastest
dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_nicest
dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.2d_luminance
dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.cube_luminance
dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_luminance
dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_luminance
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Explicitly describe the swizzle of all supported formats in the format
table. In this commit all format swizzles are set to NO_SWIZZLE, but
future commits will update some format/swizzle combinations to improve
support for the corresponding virgl formats.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Introduce the VIRGL_FORMAT_R10G10B10{A2,X2}_UNORM formats and add
support for them in the renderer.
Fixes:
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev
v2:
Also update cvs file with newly added format.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Use the GL_RGB565 internal format (provided by GL_ARB_ES2_compatibility)
for VIRGL_FORMAT_B5G6R5_UNORM.
Fixes:
dEQP-GLES2.functional.texture.format.rgb565_2d_npot
dEQP-GLES2.functional.texture.format.rgb565_2d_pot
dEQP-GLES2.functional.texture.format.rgb565_cube_npot
dEQP-GLES2.functional.texture.format.rgb565_cube_pot
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_nicest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_non_square_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_non_square_nicest
dEQP-GLES2.functional.texture.mipmap.cube.generate.rgb565_fastest
dEQP-GLES2.functional.texture.mipmap.cube.generate.rgb565_nicest
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
GLES does not support using Z32 as depth stencil, overwrite this
with Z24 which is supported.
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
These two formats are required by DRI in the guest and as such
Wayland, X11, GBM or any API built on top if DRI. The format
GL_BGRA_EXT is not supported on Desktop OpenGL.
v2: Better documentation.
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenGL ES does not have glDrawBuffer, but it does have glDrawBuffers. It has
been available in Desktop OpenGL since 2.0 and was exposed in OpenGL ES 3.0.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
I'm not sure this is 100% complete, piglit fbo-alpha now passes.
This was a guess as to why gnome-shell was broken, but I don't think
it was the correct one.