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>
This commit is contained in:
Stephen White 2021-05-06 18:34:14 +00:00 committed by Commit Bot service account
parent 3b229bd4d4
commit d0ebcbac7a
2 changed files with 17 additions and 2 deletions

View File

@ -166,8 +166,7 @@ def compute_params(root, supported_extensions):
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'):

View File

@ -35,6 +35,14 @@ MaybeError OpenGLFunctionsBase::LoadOpenGLESProcs(GetProcAddress getProc, int ma
}
{% 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 @@ MaybeError OpenGLFunctionsBase::LoadDesktopGLProcs(GetProcAddress getProc, int m
}
{% 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 {};
}