summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-01 10:59:40 -0700
committerJason Ekstrand <[email protected]>2017-08-02 09:13:13 -0700
commita25267654b08e2a34c673b905107c3cc3e856d0a (patch)
treee3a66ad00d474a42456d1bf940df1ad023805436 /src/intel/vulkan
parentaab06494873bd9f46e8db960ea1f889701d43400 (diff)
anv: Make some bits of anv_extensions module-private
This way we can use "from anv_extensions import *" in the entrypoint generator without worrying too much about pollution Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py4
-rw-r--r--src/intel/vulkan/anv_extensions.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 0c6e3103a3d..9177a94cb98 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -30,7 +30,7 @@ import xml.etree.cElementTree as et
from mako.template import Template
-import anv_extensions
+from anv_extensions import *
MAX_API_VERSION = 1.0
@@ -268,7 +268,7 @@ def get_entrypoints(doc, entrypoints_to_defines):
for command in feature.findall('./require/command'):
enabled_commands.add(command.attrib['name'])
- supported = set(ext.name for ext in anv_extensions.EXTENSIONS)
+ supported = set(ext.name for ext in EXTENSIONS)
for extension in doc.findall('.extensions/extension'):
if extension.attrib['name'] not in supported:
continue
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index 005a514eca8..0d243c6f138 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -64,7 +64,7 @@ EXTENSIONS = [
Extension('VK_KHX_multiview', 1, True),
]
-def init_exts_from_xml(xml):
+def _init_exts_from_xml(xml):
""" Walk the Vulkan XML and fill out extra extension information. """
xml = et.parse(xml)
@@ -84,7 +84,7 @@ def init_exts_from_xml(xml):
for ext in EXTENSIONS:
assert ext.type == 'instance' or ext.type == 'device'
-TEMPLATE = Template(COPYRIGHT + """
+_TEMPLATE = Template(COPYRIGHT + """
#include "anv_private.h"
#include "vk_util.h"
@@ -172,7 +172,7 @@ if __name__ == '__main__':
parser.add_argument('--xml', help='Vulkan API XML file.', required=True)
args = parser.parse_args()
- init_exts_from_xml(args.xml)
+ _init_exts_from_xml(args.xml)
template_env = {
'instance_extensions': [e for e in EXTENSIONS if e.type == 'instance'],
@@ -180,4 +180,4 @@ if __name__ == '__main__':
}
with open(args.out, 'w') as f:
- f.write(TEMPLATE.render(**template_env))
+ f.write(_TEMPLATE.render(**template_env))