Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migrated] SPIR-V wishlist #141

Open
rust-gpu-bot opened this issue Nov 13, 2024 · 0 comments
Open

[Migrated] SPIR-V wishlist #141

rust-gpu-bot opened this issue Nov 13, 2024 · 0 comments

Comments

@rust-gpu-bot
Copy link

Issue automatically imported from old repo: EmbarkStudios/rust-gpu#17
Old labels: t: tracking issue
Originally creatd by Jasper-Bekkers on 2020-08-20T13:53:30Z


Tracking issue for features we think are missing or useful in to have in SPIR-V

  • OpTrap: trigger a breakpoint
@rust-gpu-bot
Copy link
Author

@rust-gpu-bot
Copy link
Author

Comment from khyperia (CONTRIBUTOR) on 2020-09-01T12:30:36Z


For the "equivalent of llvm.*", there are a lot of these, those are just the ones that have been hit so far - I've just been JITting them into the codebase. For a reasonably full list, look at this file - for example, llvm.expect.i1 (sym::likely/sym::unlikely), llvm.debugtrap (sym::breakpoint), and so forth. (including llvm.trap (sym::abort), which was already mentioned at the start of this thread)

https://github.com/rust-lang/rust/blob/e88e908e66cd1e6e30d789b37bcd774951d01856/compiler/rustc_codegen_llvm/src/intrinsic.rs

@rust-gpu-bot
Copy link
Author

Comment from Jasper-Bekkers (CONTRIBUTOR) on 2020-09-11T16:21:20Z


@rust-gpu-bot
Copy link
Author

Comment from nhaehnle on 2020-09-11T16:23:55Z


* Potentially request OpControlBarrier  for non-uniform controlflow (useful for #29)

To clarify, for #29 the thinking is that OpControlBarrier without undefined behavior may be useful. This would be done by making the behavior a guaranteed hang when it's not executed in uniform control flow...

@rust-gpu-bot
Copy link
Author

Comment from Jasper-Bekkers (CONTRIBUTOR) on 2020-10-13T15:43:20Z


@khyperia
not only is this legal spir-v, it is unspecified what the return value is (like, it's not specified as undefined, it's unspecified)

         %f_ = OpFunction %int None %7
          %9 = OpLabel
          %x = OpVariable %_ptr_Function_int Function
         %12 = OpLoad %int %x
               OpReturnValue %12
               OpFunctionEnd

can we get this fixed in the spec, please?
this is equivalent to the glsl

int f() {
    int x; // explicitly uninitialized
    return x;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant