Skip to content

Commit

Permalink
Fix links to commands in API specification (#1179)
Browse files Browse the repository at this point in the history
Links were not created for commands defined by extensions. With this
changes all uses of e.g. {clCreateSemaphoreWithPropertiesKHR} link
to the definition of the command which makes navigating the specification
much easier.


Change-Id: I4a9458609f4ba3229b66e3d169a68cb4564e2538

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
  • Loading branch information
kpet authored Jun 4, 2024
1 parent 13ecb48 commit f37a868
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/gen_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def GetFooter():

numberOfFuncs = numberOfFuncs + 1

# Add extension API functions without links:
# Add extension API functions with and without links:
for extension in spec.findall('extensions/extension/require'):
for api in extension.findall('command'):
name = api.get('name')
Expand All @@ -110,7 +110,8 @@ def GetFooter():
# // clGetGLObjectInfo
# :clGetGLObjectInfo: pass:q[*clGetGLObjectInfo*]
apiLinkFile.write('// ' + name + '\n')
apiLinkFile.write(':' + name + ': pass:q[*' + name + '*]\n')
apiLinkFile.write(':' + name + '_label: pass:q[*' + name + '*]\n')
apiLinkFile.write(':' + name + ': <<' + name + ',{' + name + '_label}>>\n')
apiLinkFile.write('\n')

apiNoLinkFile.write('// ' + name + '\n')
Expand Down

0 comments on commit f37a868

Please sign in to comment.