INNER CODE UNIT · Python
shader_to_win_path
Hongtae/SwiftVVD · SupportPackages/SPIRV-Cross/Sources/test_shaders.py:440
def shader_to_win_path(shader):
# It's (very) convenient to be able to run HLSL testing in wine on Unix-likes, so support that.
try:
with subprocess.Popen(['winepath', '-w', shader], stdout = subprocess.PIPE, stderr = subprocess.PIPE) as f:
stdout_data, stderr_data = f.communicate()
return stdout_data.decode('utf-8')
except OSError as oe:
if (oe.errno != errno.ENOENT): # Ignore not found errors
return shader
except subprocess.CalledProcessError:
raise
return shader
ignore_fxc = False
def validate_shader_hlsl(shader, force_no_external_validation, paths):
test_glslang = True
if '.nonuniformresource.' in shader: