mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-21 22:34:34 +00:00
std: fix ray query initialization and proceed result (#740)
This commit is contained in:
parent
b0676cba61
commit
f0560824fe
@ -219,11 +219,12 @@ impl RayQuery {
|
||||
ray_tmax: f32,
|
||||
) {
|
||||
asm! {
|
||||
"%acceleration_structure = OpLoad _ {acceleration_structure}",
|
||||
"%origin = OpLoad _ {ray_origin}",
|
||||
"%direction = OpLoad _ {ray_direction}",
|
||||
"OpRayQueryInitializeKHR \
|
||||
{ray_query} \
|
||||
{acceleration_structure} \
|
||||
%acceleration_structure \
|
||||
{ray_flags} \
|
||||
{cull_mask} \
|
||||
%origin \
|
||||
@ -256,7 +257,7 @@ impl RayQuery {
|
||||
"%u32_0 = OpConstant %u32 0",
|
||||
"%u32_1 = OpConstant %u32 1",
|
||||
"%result = OpRayQueryProceedKHR %bool {ray_query}",
|
||||
"{result} = OpSelect %u32 %result %u32_0 %u32_1",
|
||||
"{result} = OpSelect %u32 %result %u32_1 %u32_0",
|
||||
ray_query = in(reg) self,
|
||||
result = out(reg) result,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user