Commit 4c19e00
committed
vo_gpu: opengl: use R8/RG8 formats on GLES 2.0 and GL 2.1
GLES 2.0 contexts with GL_EXT_texture_rg never used single- and
two-component R/RG textures, because the format table only listed
them for GL 3.0/ES 3.0, or for GL 2.1 with texture_rg + texture_float
+ FBOs all present (F_GL2F). Video planes were uploaded as LUMINANCE/
LUMINANCE_ALPHA instead, which needs a swizzle hack and mismatches
the .rg layout produced by dmabuf imports of DRM_FORMAT_R8/GR88
(NV12 via drm-prime), and forced dumb mode due to the have_texrg
check.
Add format classes for ES2 with GL_EXT_texture_rg (unsized internal
formats, as ES2 requires) and for GL 2.1 with ARB/EXT_texture_rg
alone, without the float/FBO requirements of F_GL2F. The entries are
placed before the legacy LUMINANCE ones so format lookups prefer
them; F_GL2RG is suppressed when F_GL2F is active to avoid duplicate
entries.1 parent 04830ca commit 4c19e00
2 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | | - | |
| 116 | + | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
| |||
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
119 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
0 commit comments