KhronosGroup / GLSL

GLSL Shading Language Issue Tracker
328 stars 96 forks source link

Clarify about RayQuery with using DeviceAddress... #178

Closed ghost closed 2 years ago

ghost commented 2 years ago

I address into glslang issue, but about spec issue... should be used any uint64_t or uvec2 with accelerationStructureEXT(accStructAddress) or not, with ray query compute shaders? Issue: https://github.com/KhronosGroup/glslang/issues/2903

dgkoch commented 2 years ago

I'm not clear what your question is, but per modifications to section 5.4.1 in GLSL_EXT_ray_tracing:

  Acceleration structure types can be constructed only from a single uint64_t
  value or from a uvec2 value. Other types cannot be constructed from
  acceleration structure types.

Ie either uint64_t or uvec2 can be use to construct an acceleration structure address.

However, in order to use uint64_t types, you need to enable ARB_gpu_shader_int64 as they are not a standard part of GLSL 4.60.

ghost commented 2 years ago

Also, for GLSL we have GL_EXT_shader_explicit_arithmetic_types_int64, this extension will no works?

dgkoch commented 2 years ago

Oh yeah - that one should work too.

ghost commented 2 years ago

https://github.com/KhronosGroup/glslang/issues/2903#issuecomment-1063682354

dgkoch commented 2 years ago

This doesn't seem like a spec or glslang issue then. Please send a repro case to vulkan-support@nvidia.com

ghost commented 2 years ago

Answer from NVIDIA...

 Because this is an AddressSanitizer error, can you confirm the crash does not repro when run without ASAN? By default ASAN does not intercept GlobalAlloc, which leads to false positives. Because our driver uses GlobalAlloc and GlobalFree you need to set this in the environment:

ASAN_OPTIONS=windows_hook_legacy_allocators=true

You can read more about this runtime option here: https://docs.microsoft.com/en-us/cpp/sanitizers/asan-runtime?view=msvc-170#msvc-specific-addresssanitizer-runtime-options