diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6821002b6d..c11603dd70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -229,13 +229,14 @@ jobs: run: | vcpkg/vcpkg install glslang --triplet=x64-windows glslangValidator.exe -v - python python/Scripts/generateshader.py resources/Materials/Examples --target glsl --validator glslangValidator.exe --vulkanGlsl True --validatorArgs="-V --aml" + python python/Scripts/generateshader.py resources/Materials/Examples --target glsl --validator glslangValidator.exe python python/Scripts/generateshader.py resources/Materials/Examples --target essl --validator glslangValidator.exe - name: Shader Validation Tests (MacOS) if: matrix.test_shaders == 'ON' && runner.os == 'macOS' run: | python python/Scripts/generateshader.py resources/Materials/Examples --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w" + python python/Scripts/generateshader.py resources/Materials/TestSuite/stdlib --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w" - name: Coverage Analysis Tests if: matrix.coverage_analysis == 'ON' diff --git a/python/Scripts/generateshader.py b/python/Scripts/generateshader.py index cd158f2143..259812f6f1 100644 --- a/python/Scripts/generateshader.py +++ b/python/Scripts/generateshader.py @@ -139,13 +139,6 @@ def main(): shadergen.setUnitSystem(unitsystem) genoptions.targetDistanceUnit = 'meter' - # Look for renderable nodes - nodes = mx_gen_shader.findRenderableElements(doc) - if not nodes: - nodes = doc.getMaterialNodes() - if not nodes: - nodes = doc.getNodesOfType(mx.SURFACE_SHADER_TYPE_STRING) - pathPrefix = '' if opts.outputPath and os.path.exists(opts.outputPath): pathPrefix = opts.outputPath + os.path.sep @@ -154,11 +147,11 @@ def main(): print('- Shader output path: ' + pathPrefix) failedShaders = "" - for node in nodes: - nodeName = node.getName() - print('-- Generate code for node: ' + nodeName) - nodeName = mx.createValidName(nodeName) - shader = shadergen.generate(nodeName, node, context) + for elem in mx_gen_shader.findRenderableElements(doc): + elemName = elem.getName() + print('-- Generate code for element: ' + elemName) + elemName = mx.createValidName(elemName) + shader = shadergen.generate(elemName, elem, context) if shader: # Use extension of .vert and .frag as it's type is # recognized by glslangValidator @@ -189,17 +182,17 @@ def main(): errors = validateCode(filename, opts.validator, opts.validatorArgs) if errors != "": - print("--- Validation failed for node: ", nodeName) + print("--- Validation failed for element: ", elemName) print("----------------------------") print('--- Error log: ', errors) print("----------------------------") - failedShaders += (nodeName + ' ') + failedShaders += (elemName + ' ') else: - print("--- Validation passed for node:", nodeName) + print("--- Validation passed for element:", elemName) else: - print("--- Validation failed for node:", nodeName) - failedShaders += (nodeName + ' ') + print("--- Validation failed for element:", elemName) + failedShaders += (elemName + ' ') if failedShaders != "": sys.exit(-1) diff --git a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx b/resources/Materials/TestSuite/stdlib/convert/convert.mtlx index 377cb015df..f29b1eaab4 100644 --- a/resources/Materials/TestSuite/stdlib/convert/convert.mtlx +++ b/resources/Materials/TestSuite/stdlib/convert/convert.mtlx @@ -1,8 +1,5 @@ - @@ -30,85 +27,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -