From 4de62731f4db56360026cbb6a3b8566f86f22466 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 23 Jan 2024 17:41:21 +0100 Subject: [PATCH] mesa/main: add support for EXT_texture_storage It's sometimes really, really useful if GL_BGRA8 can be used as a sized internal format, and the combination of EXT_texture_storage and EXT_texture_format_BGRA8888 allows this (only when using texture-storage, which is good enough in some cases). Until now, we've only implemented ARB_texture_storage, and not the EXT version. So let's implement the EXT version as well, so we get the benefit of the interaction here. This pulls in a lot of other similar interactions as well, which also seems useful. ...because the ARB version is created from the EXT version, let's move the EXT function definitions to the EXT extension. These should probably have been suffixed with ARB in the ARB-version, but things seems to have just ended up kinda confused. Oh well. Reviewed-by: Daniel Stone Part-of: --- docs/features.txt | 2 +- src/mapi/glapi/gen/ARB_texture_storage.xml | 27 --------- src/mapi/glapi/gen/EXT_texture_storage.xml | 67 ++++++++++++++++++++++ src/mapi/glapi/gen/gl_API.xml | 3 + src/mapi/glapi/gen/meson.build | 1 + src/mesa/main/extensions_table.h | 1 + src/mesa/main/texstorage.c | 50 ++++++++++++++++ src/mesa/state_tracker/st_format.c | 2 +- 8 files changed, 124 insertions(+), 29 deletions(-) create mode 100644 src/mapi/glapi/gen/EXT_texture_storage.xml diff --git a/docs/features.txt b/docs/features.txt index 15cfe300672..728cf551dbc 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -400,7 +400,7 @@ GL_EXT_direct_state_access additions from other extensions (complete list): GL_EXT_external_buffer n/a GL_EXT_separate_shader_objects n/a GL_EXT_sparse_texture n/a - GL_EXT_texture_storage n/a + GL_EXT_texture_storage DONE GL_EXT_vertex_attrib_64bit DONE GL_EXT_EGL_image_storage n/a GL_NV_bindless_texture n/a diff --git a/src/mapi/glapi/gen/ARB_texture_storage.xml b/src/mapi/glapi/gen/ARB_texture_storage.xml index 4dbab3947e9..5a6da38b044 100644 --- a/src/mapi/glapi/gen/ARB_texture_storage.xml +++ b/src/mapi/glapi/gen/ARB_texture_storage.xml @@ -34,33 +34,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/mapi/glapi/gen/EXT_texture_storage.xml b/src/mapi/glapi/gen/EXT_texture_storage.xml new file mode 100644 index 00000000000..512823e33a6 --- /dev/null +++ b/src/mapi/glapi/gen/EXT_texture_storage.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 874ec8dd552..a3e2c804cca 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -12557,6 +12557,9 @@ + +