Files
godot-angle-static/extensions/ANGLE_rgbx_internal_format.txt
Yiwei Zhang df9468565c Map RGBX AHB to GL_RGBX8_ANGLE and fix the load function
AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM was false mapped to GL_RGB8, which
will write back to the backing exteranl storage with 3 channel layout.
Angle actually has ANGLE_rgbx_internal_format to fix the mapping with
GL_RGBX8_ANGLE. However, the load function must align with GL_RGB8 if
the actual storage is 4 channel. This change also fixes that to use
LoadToNative3To4<GLubyte, 0xFF>.

Bug: b/238460927
Test: CtsNativeHardwareTestCases#SingleLayer_ColorTest_*_R8G8B8X8_*
Test: ImageTestES3.RGBXAHB* pass without VVL error
Change-Id: Ic5db4cb4adba252949d64e560ff32e492a045912
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3846413
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
2022-08-23 17:38:26 +00:00

73 lines
1.3 KiB
Plaintext

Name
ANGLE_rgbx_internal_format
Name Strings
GL_ANGLE_rgbx_internal_format
Contributors
Tim Van Patten, Google
Contacts
Tim Van Patten, Google (timvp 'at' google 'dot' com)
Notice
Copyright (c) 2021 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html
Status
Draft.
Version
Version 1, November 22, 2021
Number
OpenGL ES Extension ###
Dependencies
OpenGL ES 2.0 is required.
Overview
This extension introduces a sized internal RGBX format. This is a 32-bit representation of the
24-bit RGB format, with the Alpha channel ignored.
glBlitFramebuffer() will treat RGBX8 as RGB8 when validating the formats for the READ and DRAW
framebuffers match, since the X channel is ignored.
glReadPixels() will accept the following format+type combinations:
1. format = GL_RGBX8_ANGLE, type = GL_UNSIGNED_BYTE
glTexSubImage* will accept the following format+type combinations:
1. format = GL_RGB, type = GL_UNSIGNED_BYTE
New Types
None.
New Procedures and Functions
None.
New Tokens
// 32-bit RGBX format
GL_RGBX8_ANGLE 0x96BA
Issues
None.
Revision History
#1 - (November 22, 2021) Tim Van Patten
Original draft