mesa: remove GLvertexformat

Function pointers were first set in GLvertexformat, and then
GLvertexformat was copied to the dispatch.

This just sets the function pointers in the dispatch directly,
skipping the intermediate GLvertexformat structure.

The code with SET_* calls is autogenerated by api_vtxfmt_init_h.py.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14000>
This commit is contained in:
Marek Olšák
2021-11-29 09:02:07 -05:00
parent a87e5d437e
commit bade2407fa
19 changed files with 78 additions and 1122 deletions
+5 -3
View File
@@ -58,12 +58,14 @@ class PrintCode(gl_XML.gl_print_base):
re.match('VertexAttrib[1-4].*ARB', f.name)):
# These functions should map to an *ES callback for GLES2.
settings_by_condition['_mesa_is_desktop_gl(ctx)'].append(
'SET_{0}(tab, vfmt->{0});'.format(f.name))
'SET_{0}(tab, NAME({0}));'.format(f.name))
settings_by_condition['ctx->API == API_OPENGLES2'].append(
'SET_{0}(tab, vfmt->{1}ES);'.format(f.name, f.name[:-3]))
'SET_{0}(tab, NAME_ES({0}));'.format(f.name))
else:
macro = ('NAME_CALLLIST' if f.name[0:8] == 'CallList' else
'NAME_AE' if f.name == 'ArrayElement' else 'NAME')
settings_by_condition[condition].append(
'SET_{0}(tab, vfmt->{0});'.format(f.name))
'SET_{0}(tab, {1}({0}));'.format(f.name, macro))
# Print out an if statement for each unique condition, with
# the SET_* calls nested inside it.