thread 'main' panicked at src/examples/sampler_2d_shadow_binding.rs:379:55:
called `Result::unwrap()` on an `Err` value: the currently bound pipeline accesses the sampler bound to descriptor set 0, binding 0, descriptor index 0, in a way that requires a sampler without a compare operation, but the sampler currently bound to that descriptor has a compare operation
It happened when I try to bind a sampler which compare = Some(Less). Following the backtrace of panic, I found entry_point_info has a flag in descriptor requirements sampler_compare = false , that conflict a sampler with compare operator. Maybe the Texel gather from shadow texture should need a compare operator. Here has some decription about gather from shadow: The 4 return values for shadow samplers are the [result of the comparison] for each texel location (https://www.khronos.org/opengl/wiki/Depth_Compare).
Panic at validate_draw function.
It happened when I try to bind a sampler which compare = Some(Less). Following the backtrace of panic, I found entry_point_info has a flag in descriptor requirements
sampler_compare = false
, that conflict a sampler with compare operator. Maybe the Texel gather from shadow texture should need a compare operator. Here has some decription about gather from shadow:The 4 return values for shadow samplers are the [result of the comparison] for each texel location
(https://www.khronos.org/opengl/wiki/Depth_Compare).My fragment shader:
Maybe the shader reflect need add
sampler_compare = true
for ImageGatherDref branch.main.rs
file that demonstrates the issue: