glGetInternalformati64v(GL_TEXTURE_2D, GL_SR8_EXT, GL_COLOR_ENCODING) returns GL_NONE
System information
System: Host: navi Kernel: 5.10.1-1-default x86_64 bits: 64 compiler: N/A Desktop: KDE Plasma 5.20.4 tk: Qt 5.15.2
wm: kwin_x11 dm: SDDM Distro: openSUSE Tumbleweed 20201227
CPU: Topology: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 L2 cache: 3072 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86240
Speed: 2187 MHz min/max: 2200/3600 MHz Core speeds (MHz): 1: 2187 2: 3101 3: 2170 4: 2590 5: 2071 6: 2461 7: 2231
8: 3295 9: 2169 10: 3075 11: 2132 12: 3219
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Micro-Star MSI driver: amdgpu v: kernel bus ID: 09:00.0 chip ID: 1002:67df
Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: amdgpu resolution: 2560x1440~144Hz s-dpi: 96
OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.40.0 5.10.1-1-default LLVM 11.0.0) v: 4.6 Mesa 21.0.0-devel
direct render: Yes
Describe the issue
GL_SR8_EXT
is a single-channel color format with sRGB encoding defined in GL_EXT_texture_sRGB_R8
(which Mesa advertises, at least on radeonsi). The GL_COLOR_ENCODING
query for this format is therefore expected to return GL_SRGB
. Instead, the query returns GL_NONE
, which should only happen "for non-color formats, or for unsupported resources".
Any extra information would be greatly appreciated
I'm not actually sure whether the format works at all, as I don't have a use case for it. I discovered this oddity accidentally. If it's not supposed to work, then Mesa advertises GL_EXT_texture_sRGB_R8
erroneously.