Previously the enum conversion script would convert all enums in gl.xml
including those for desktop GL. When replaying from a CPP file we would
sometimes try to use enum values that only are exposed in desktop GL.
One example is GL_TEXTURE_MAX_ANISOTROPY/GL_TEXTURE_MAX_ANISOTROPY_EXT.
GLES only has the "EXT" version. Desktop uses the core version. This
was breaking a replay sample that used the EXT enum.
Fix this by a) including the anisotropy extension in registry_xml and
b) updating the enum script to only parse GLES 2 entries. In the future
we could improve the situation by auto-generating a header that defines
exactly the enums we need for ANGLE.
Also updates the enum helper to use uppercase enum values.
Bug: angleproject:3611
Change-Id: I1e01608bc8af282dc078d5a19ac4eba659c96b57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894143
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
This change refactors the GLenum utils into a non-autogenerated and an
autogenerated portion. That makes it easier to modify the non-auto-
generated bits to properly output GLenums even when the gl.xml data
isn't totally correct. For instance, the "GetPName" group was missing
a bunch of queries. Instead of trying to fix the GL we can simply fall
back to querying the "Default" group when we return invalid enum.
Also corrects a missing "0x" on hex output.
Also allows the capture/replay sample to specify the correct binary
data directory when testing a replay.
Bug: angleproject:3611
Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
1. Add extension 'GL_ANGLE_program_binary' to registry_xml.py, this
extension brings enum 'GL_PROGRAM_BINARY_ANGLE' which ANGLE already
supports.
2. Add a fallback for converting GLenum and GLbitfield to string, for
any GLenum value not found in the conversion table, write out its hex
value instead of 'EnumUnknown'. It prevents GLenum from some
unregistered extensions breaking the frame capture.
Bug: angleproject:3804
Change-Id: I36a676305fbbcff2173bbc9f818ff589abe51434
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1775028
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>