sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts"))
-from build.common import DEQP_DIR, execute
+from ctsbuild.common import DEQP_DIR, execute
from khr_util.format import indentLines, writeInlFile
VULKAN_HEADERS_INCLUDE_DIR = os.path.join(os.path.dirname(__file__), "..", "..", "vulkan-docs", "src", "include")
''])
reqs = v[0][1:]
if len(reqs) > 0 :
- cond = 'if ( '
+ cond = ''
for i, req in enumerate(reqs) :
+ if len(cond) > 0:
+ cond += ' || '
if (req.startswith("ApiVersion")):
cond = cond + 'context.contextSupports(vk::' + req + ')'
- else:
+ elif (req.startswith("VK_")):
cond = cond + 'isExtensionStructSupported(deviceExtensions, RequiredExtension("' + req + '"))'
- if i+1 < len(reqs) :
- cond = cond + ' || '
- cond = cond + ' )'
+ if len(cond) == 0:
+ cond = 'false'
+ cond = 'if ( ' + cond + ' )'
stream.append('\t' + cond)
stream.extend(['\t{',
'\t\t' + v[0][0] + '.sType = getStructureType<' + k + '>();',