Fixes for OpenGL loader generator.
Add extensions to the appropriate (desktop or ES) LoadProc generation.
Extensions have no removed_procs, so don't check for them.
Bug: chromium:1205155
Change-Id: I705ef3fb700318f59fdbc6415fcf3909c62e39f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/generator/opengl_loader_generator.py b/generator/opengl_loader_generator.py
index 8a1d4bf..4f4f46f 100644
--- a/generator/opengl_loader_generator.py
+++ b/generator/opengl_loader_generator.py
@@ -166,8 +166,7 @@
for command in section.findall('./require/command'):
proc_name = command.attrib['name']
assert all_procs[proc_name].alias == None
- if proc_name not in removed_procs:
- section_procs.append(all_procs[proc_name])
+ section_procs.append(all_procs[proc_name])
section_enums = []
for enum in section.findall('./require/enum'):
diff --git a/generator/templates/opengl/OpenGLFunctionsBase.cpp b/generator/templates/opengl/OpenGLFunctionsBase.cpp
index 79fc5b1..cc35dad 100644
--- a/generator/templates/opengl/OpenGLFunctionsBase.cpp
+++ b/generator/templates/opengl/OpenGLFunctionsBase.cpp
@@ -35,6 +35,14 @@
}
{% endfor %}
+
+ {% for block in extension_gles_blocks %}
+ // {{block.extension}}
+ {% for proc in block.procs %}
+ DAWN_TRY(LoadProc(getProc, &{{proc.ProcName()}}, "{{proc.glProcName()}}"));
+ {% endfor %}
+ {% endfor %}
+
return {};
}
@@ -48,6 +56,14 @@
}
{% endfor %}
+
+ {% for block in extension_desktop_gl_blocks %}
+ // {{block.extension}}
+ {% for proc in block.procs %}
+ DAWN_TRY(LoadProc(getProc, &{{proc.ProcName()}}, "{{proc.glProcName()}}"));
+ {% endfor %}
+ {% endfor %}
+
return {};
}