diff --git a/naga/src/front/wgsl/mod.rs b/naga/src/front/wgsl/mod.rs index a0b6416775d..aec1e657fce 100644 --- a/naga/src/front/wgsl/mod.rs +++ b/naga/src/front/wgsl/mod.rs @@ -48,11 +48,11 @@ impl Frontend { // NOTE: Keep this in sync with `wgpu::Device::create_shader_module`! // NOTE: Keep this in sync with `wgpu_core::Global::device_create_shader_module`! /// -/// Compiler-enforced limits for WGSL parsing recursion exist; if shader compilation runs into -/// them, it will return an error gracefully. However, on some build profiles and platforms, the -/// default stack size for a thread may be exceeded before this limit is reached during parsing. -/// Callers should ensure that there is enough stack space for this, particularly if calls to this -/// method are exposed to user input. +/// This function may consume a lot of stack space. Compiler-enforced limits for parsing recursion +/// exist; if shader compilation runs into them, it will return an error gracefully. However, on +/// some build profiles and platforms, the default stack size for a thread may be exceeded before +/// this limit is reached during parsing. Callers should ensure that there is enough stack space +/// for this, particularly if calls to this method are exposed to user input. /// /// pub fn parse_str(source: &str) -> Result { diff --git a/wgpu-core/src/device/global.rs b/wgpu-core/src/device/global.rs index 48721144312..891a62ad23c 100644 --- a/wgpu-core/src/device/global.rs +++ b/wgpu-core/src/device/global.rs @@ -1176,11 +1176,12 @@ impl Global { // NOTE: Keep this in sync with `naga::front::wgsl::parse_str`! // NOTE: Keep this in sync with `wgpu::Device::create_shader_module`! /// - /// Compiler-enforced limits for parsing recursion exist; if shader compilation runs into them, - /// it will return an error gracefully. However, on some build profiles and platforms, the - /// default stack size for a thread may be exceeded before this limit is reached during - /// parsing. Callers should ensure that there is enough stack space for this, particularly if - /// calls to this method are exposed to user input. + /// This function may consume a lot of stack space. Compiler-enforced limits for parsing + /// recursion exist; if shader compilation runs into them, it will return an error gracefully. + /// However, on some build profiles and platforms, the default stack size for a thread may be + /// exceeded before this limit is reached during parsing. Callers should ensure that there is + /// enough stack space for this, particularly if calls to this method are exposed to user + /// input. /// /// pub fn device_create_shader_module( diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 619b1307367..a49c72a1ed2 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -2301,11 +2301,12 @@ impl Device { // NOTE: Keep this in sync with `naga::front::wgsl::parse_str`! // NOTE: Keep this in sync with `wgpu_core::Global::device_create_shader_module`! /// - /// Compiler-enforced limits for WGSL parsing recursion exist; if shader compilation runs into - /// them, it will return an error gracefully. However, on some build profiles and platforms for - /// native targets, the default stack size for a thread may be exceeded before this limit is - /// reached during parsing. Callers should ensure that there is enough stack space for this, - /// particularly if calls to this method are exposed to user input. + /// This function may consume a lot of stack space. Compiler-enforced limits for parsing + /// recursion exist; if shader compilation runs into them, it will return an error gracefully. + /// However, on some build profiles and platforms, the default stack size for a thread may be + /// exceeded before this limit is reached during parsing. Callers should ensure that there is + /// enough stack space for this, particularly if calls to this method are exposed to user + /// input. /// /// pub fn create_shader_module(&self, desc: ShaderModuleDescriptor<'_>) -> ShaderModule {