Branch
Hash :
a1665d2f
Author :
Date :
2024-05-10T00:15:31
Reland "Document thread-unsafe iterator access to resource maps" This is a reland of commit d1bb6ed8399dd12e79484f30f9e9ded95c25625a The crash was due to another issue (disabling EGL validation in Chrome) Original change's description: > Document thread-unsafe iterator access to resource maps > > By using a proxy type, everywhere resource maps are iterated are clearly > marked as not being thread safe. In most cases, only destruction and > capture/replay iterate over these maps, which means thread safety is not > an issue (or is externally enforced). > > The only case where iterators are used in the presence of other contexts > is with ANGLE_request_extension, which is changed to explicitly require > the application to ensure thread safety. In practice, the user is > Chrome which already guarantees this. > > Bug: angleproject:8667 > Change-Id: I7af13c6433b6955d9c36f9088b3aa4c065e1cfc1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5526428 > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8667 Change-Id: Id539cabac01df5f242150f6684222577003eef3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5531278 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
Name
ANGLE_request_extension
Name Strings
GL_ANGLE_request_extension
Contributors
Geoff Lang
James Darpinian
Contact
Geoff Lang (geofflang 'at' google.com)
Notice
Copyright (c) 2016 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html
Status
Draft
Version
Version 2, October 4, 2019
Number
OpenGL ES Extension #??
Dependencies
Requires OpenGL ES 2.0
Written against the OpenGL ES 3.0 specification.
Overview
This extension allows the client to query extensions that can be enabled and
explicitly request that an extension be enabled or disabled.
New Procedures and Functions
void RequestExtension(const char *name)
void DisableExtension(const char *name)
New Tokens
Accepted by the <name> parameter of GetString and GetStringi:
REQUESTABLE_EXTENSIONS_ANGLE 0x93A8
Accepted by the <value> parameter of the GetInteger* functions:
NUM_REQUESTABLE_EXTENSIONS_ANGLE 0x93A9
Additions to the OpenGL ES 3.0 Specification
Add the following paragraph to the end paragraph 4 of section 6.1.6, String
Queries:
"REQUESTABLE_EXTENSIONS_ANGLE returns a list of extensions that can be
enabled at runtime by calling RequestExtension."
Change the following section of paragraph 6 of section 6.1.6, String Queries:
- "name may only be EXTENSIONS, indicating that the extension name
- corresponding to the indexth supported extension should be returned.
- <index> may range from zero to the value of NUM_EXTENSIONS minus one"
+ "name may be EXTENSIONS or REQUESTABLE_EXTENSIONS_ANGLE, indicating that
+ the extension name corresponding to the indexth supported or requestable
+ extension should be returned. <index> may range from zero to the value of
+ NUM_EXTENSIONS and NUM_REQUESTABLE_EXTENSIONS_ANGLE minus one"
The commands
void RequestExtension(const char *name)
void DisableExtension(const char *name)
enable or disable the requestable OpenGL ES extension named <name>. If the
requested extension was not requestable or disablable, INVALID_OPERATION is
generated. Not all requestable extensions can be disabled. There is
currently no query for disablable extensions. This operation is not thread
safe, and the application is responsible for ensuring no other context in
the share group is accessed by another thread during this operation.
New State
Add to Table 6.30 (Implementation Dependent Version and Extension Support)
Get value Type Get Cmd Min Value Description Sec.
-------------------------------- ---- ----------- --------- -------------------------------- -----
NUM_REQUESTABLE_EXTENSIONS_ANGLE Z+ GetIntegerv - Number of individual requestable 6.1.6
extension names
Interactions with the OpenGL ES 2.0 specification:
Remove all references to GetStringi and NUM_REQUESTABLE_EXTENSIONS_ANGLE.
Issues
(1) How can the user determine which extensions can be enabled without
potentially generating errors?
This can be solved by:
a) Never generate an error in EnableExtensions, simply return false when
the extension is not recognized or cannot be enabled.
b) Add another query for the extensions that the context supports
enabling.
RESOLVED: Use (b) because it allows the context to explicity advertise
which extensions support enabling and doesn't generate errors in the
normal use case.
Revision History
Rev. Date Author Changes
---- ------------- --------- ----------------------------------------
1 Nov 28, 2016 geofflang Initial version
2 Oct 4, 2019 jdarpinian Add DisableExtension