Skip to content

Unable to repro a bug, unsure if I'm running code wrong #173

Closed Answered by LegNeato
zanciks asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I already put up a fix for this! #174. We must have crossed in flight.

A couple of things:

  1. When run on CPU, the spirv annotation goes away and it becomes a normal function. If there is a standard bswap intrinsic in Rust (looks like there is: https://doc.rust-lang.org/std/intrinsics/fn.bswap.html), it is likely using that.
  2. You are unable to use println in shaders, so if you are printing it is most likely running on CPU. There is a debug_printf! macro that works on the GPU but that requires you to install the vulkan SDK and enable vulkan layers to see the output (I want to make it better and hook stuff up to println because it sucks from a UX perspective to be non-standard and I refuse…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LegNeato
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants