Skip to content

Commit 8935b17

Browse files
committed
SPIR-V: NFC fixes.
1 parent 2b7f740 commit 8935b17

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/spirv.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ end
149149
cmd = `$(SPIRV_Tools_jll.spirv_val()) $translated`
150150
proc = run(ignorestatus(cmd))
151151
if !success(proc)
152-
error("""Failed to validate generated SPIR-V.
153-
If you think this is a bug, please file an issue and attach $(input) and $(translated).""")
152+
run(`$(SPIRV_Tools_jll.spirv_dis()) $translated -o -`)
153+
error("""Failed to validate generated SPIR-V.
154+
If you think this is a bug, please file an issue and attach $(input) and $(translated).""")
154155
end
155156
end
156157

@@ -168,10 +169,10 @@ end
168169
end
169170

170171
output = if format == LLVM.API.LLVMObjectFile
171-
read(translated)
172+
read(optimized)
172173
else
173174
# disassemble
174-
read(`$(SPIRV_Tools_jll.spirv_dis()) $translated`, String)
175+
read(`$(SPIRV_Tools_jll.spirv_dis()) $optimized`, String)
175176
end
176177

177178
rm(input)

0 commit comments

Comments
 (0)