xref: /aosp_15_r20/external/angle/doc/ResourceLimits.md (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Resource Limits
2*8975f5c5SAndroid Build Coastguard Worker
3*8975f5c5SAndroid Build Coastguard WorkerOpenGL ES 2.0 API is quite powerful but there are still some features that are
4*8975f5c5SAndroid Build Coastguard Workeroptional or allow for wide variability between implementations.
5*8975f5c5SAndroid Build Coastguard Worker
6*8975f5c5SAndroid Build Coastguard WorkerApplications that need more than the minimum values for these limits should
7*8975f5c5SAndroid Build Coastguard Workerquery the capabilities of the GL device and scale their usage based on the
8*8975f5c5SAndroid Build Coastguard Workerdevice’s feature set. Failing to do so and assuming sufficient limits typically
9*8975f5c5SAndroid Build Coastguard Workerresults in reduced portability.
10*8975f5c5SAndroid Build Coastguard Worker
11*8975f5c5SAndroid Build Coastguard WorkerThe various implementation dependent limits can be found in Tables 6.18 – 6.20
12*8975f5c5SAndroid Build Coastguard Workerof the [OpenGL ES 2.0.25 specification]
13*8975f5c5SAndroid Build Coastguard Worker(http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf).
14*8975f5c5SAndroid Build Coastguard Worker
15*8975f5c5SAndroid Build Coastguard Worker# Capabilities
16*8975f5c5SAndroid Build Coastguard Worker
17*8975f5c5SAndroid Build Coastguard WorkerCapability                                 | ES 2.0 Minimum | ANGLE            | SM2   | SM3      | SM4+
18*8975f5c5SAndroid Build Coastguard Worker:----------------------------------------- | :------------- | :--------------- | :---- | :------- | :-------
19*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_VERTEX\_ATTRIBS                   | 8              | 16               |       |          |
20*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_VERTEX\_UNIFORM\_VECTORS          | 128            | 254              |       |          |
21*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_VERTEX\_TEXTURE\_IMAGE\_UNITS     | 0              | (fn1)            | 0     | 0        | 4
22*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_VARYING\_VECTORS                  | 8              | (fn1)            | 8     | 10       | 10
23*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_FRAGMENT\_UNIFORM\_VECTORS        | 16             | (fn1)            | 29    | 221      | 221
24*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_TEXTURE\_IMAGE\_UNITS             | 8              | 16               |       |          |
25*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_TEXTURE\_SIZE                     | 64             | 2048-16384 (fn1) |       |          |
26*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_CUBE\_MAP\_SIZE                   | 16             | 2048-16384 (fn1) |       |          |
27*8975f5c5SAndroid Build Coastguard WorkerGL\_MAX\_RENDERBUFFER\_SIZE                | 1              | 2048-16384 (fn1) |       |          |
28*8975f5c5SAndroid Build Coastguard WorkerGL\_ALIASED\_POINT\_SIZE\_RANGE (min, max) | (1, 1)         | (fn2)            | (1,1) | (1, fn2) | (1, fn2)
29*8975f5c5SAndroid Build Coastguard WorkerGL\_ALIASED\_LINE\_WIDTH\_RANGE (min, max) | (1, 1)         | (1, 1)           |       |          |
30*8975f5c5SAndroid Build Coastguard Worker
31*8975f5c5SAndroid Build Coastguard Worker## Notes
32*8975f5c5SAndroid Build Coastguard Worker
33*8975f5c5SAndroid Build Coastguard Worker*   fn1: limits vary based on the underlying hardware capabilities
34*8975f5c5SAndroid Build Coastguard Worker*   fn2: on SM3 or better hardware the max point size is D3DCAPS9.MaxPointSize
35