xref: /aosp_15_r20/external/mesa3d/docs/_extra/specs/MESA_sampler_objects.spec (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1Name
2
3    MESA_sampler_objects
4
5Name Strings
6
7    GL_MESA_sampler_objects
8
9Contact
10
11    Adam Jackson <ajax@redhat.com>
12
13Contributors
14
15    Emma Anholt
16    The contributors to ARB_sampler_objects and OpenGL ES 3
17
18Status
19
20    Shipping
21
22Version
23
24    Last Modified Date:         14 Sep 2021
25    Author Revision:            3
26
27Number
28
29    TBD
30
31Dependencies
32
33    OpenGL ES 2.0 is required.
34
35    This extension interacts with:
36      - EXT_shadow_samplers
37      - EXT_texture_filter_anisotropic
38      - EXT_texture_sRGB_decode
39      - OES_texture_border_clamp
40
41Overview
42
43    This extension makes the sampler object subset of OpenGL ES 3.0 available
44    in OpenGL ES 2.0 contexts. As the intent is to allow access to the API
45    without necessarily requiring additional renderer functionality, some
46    sampler state that would be mandatory in GLES 3 is dependent on the
47    presence of additional extensions. Under GLES 3.0 or above this extension's
48    name string may be exposed for compatibility, but it is otherwise without
49    effect.
50
51    Refer to the OpenGL ES 3.0 specification for API details not covered here.
52
53New Procedures and Functions
54
55    void glGenSamplers (GLsizei count, GLuint *samplers);
56    void glDeleteSamplers (GLsizei count, const GLuint *samplers);
57    GLboolean glIsSampler (GLuint sampler);
58    void glBindSampler (GLuint unit, GLuint sampler);
59    void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
60    void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
61    void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
62    void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
63    void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
64    void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
65
66    Note that these names are exactly as in ES3, with no MESA suffix.
67
68New Tokens
69
70            SAMPLER_BINDING                                 0x8919
71
72Interactions
73
74    If EXT_shadow_samplers is not supported then TEXTURE_COMPARE_MODE and
75    TEXTURE_COMPARE_FUNC will generate INVALID_ENUM.
76
77    If EXT_texture_filter_anisotropic is not supported then
78    TEXTURE_MAX_ANISOTROPY_EXT will generate INVALID_ENUM.
79
80    If EXT_texture_sRGB_decode is not supported then TEXTURE_SRGB_DECODE_EXT
81    will generate INVALID_ENUM.
82
83    If OES_texture_border_clamp is not supported then TEXTURE_BORDER_COLOR
84    will generate INVALID_ENUM.
85
86Issues
87
88    1) Why bother?
89
90    Sampler objects, at least in Mesa, are generically supported without any
91    driver-dependent requirements, so enabling this is essentially free. This
92    simplifies application support for otherwise GLES2 hardware, and for
93    drivers in development that haven't yet achieved GLES3.
94
95Revision History
96
97    Rev.    Date      Author    Changes
98    ----  --------    --------  ---------------------------------------------
99      1   2019/10/22  ajax      Initial revision
100      2   2019/11/14  ajax      Add extension interactions:
101                                  - EXT_shadow_samplers
102                                  - EXT_texture_filter_anisotropic
103                                  - EXT_texture_sRGB_decode
104                                  - OES_texture_border_clamp
105      3   2021/09/14  ajax      Expand the justification and ES3 interaction
106