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

Validation error in ComputeImageLut #6

Closed
MaikKlein opened this issue Jul 17, 2021 · 1 comment
Closed

Validation error in ComputeImageLut #6

MaikKlein opened this issue Jul 17, 2021 · 1 comment

Comments

@MaikKlein
Copy link
Member

vkCmdBindDescriptorSets(): pDynamicOffsets[1] is 0x400, but must be zero since the buffer descriptor's range is VK_WHOLE_SIZE in descriptorSet #0 binding #1 descriptor[0]. The Vulkan spec states: For each dynamic uniform or storage buffer binding in pDescriptorSets, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979

Seems like the culprit is somewhere in ComputeImageLut, but my vulkan foo is a bit rusty and not in a good way. Haven't yet found WHOLE_SIZE being passed in [0]

RUST_BACKTRACE=1 cargo run --bin view -- --scene battle --width 1920 --height 1080

Backtrace

thread 'main' panicked at 'Validation Error: [ VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979 ] Object 0: handle = 0x556e25786968, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x603cd90000000044, type = VK_OBJECT_TYPE_DESCRIPTOR_SET; Object 2: handle = 0x6612e40000000041, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xa159a763 | vkCmdBindDescriptorSets(): pDynamicOffsets[1] is 0x400, but must be zero since the buffer descriptor's range is VK_WHOLE_SIZE in descriptorSet #0 binding #1 descriptor[0]. The Vulkan spec states: For each dynamic uniform or storage buffer binding in pDescriptorSets, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979)
', crates/lib/kajiya-backend/src/vulkan/instance.rs:147:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/panicking.rs:435:5
   2: kajiya_backend::vulkan::instance::vulkan_debug_callback
             at ./crates/lib/kajiya-backend/src/vulkan/instance.rs:147:9
   3: debug_log_msg
             at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.182/layers/vk_layer_logging.h:481:68
   4: LogMsgLocked
             at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.182/layers/vk_layer_logging.h:735:32
   5: _ZNK16ValidationObject8LogErrorERK13LogObjectListRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcz
             at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.182/layers/generated/chassis.h:3295:32
   6: _ZNK10CoreChecks36PreCallValidateCmdBindDescriptorSetsEP17VkCommandBuffer_T19VkPipelineBindPointP18VkPipelineLayout_TjjPKP17VkDescriptorSet_TjPKj
             at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.182/layers/core_validation.cpp:6989:49
   7: _ZN20vulkan_layer_chassis21CmdBindDescriptorSetsEP17VkCommandBuffer_T19VkPipelineBindPointP18VkPipelineLayout_TjjPKP17VkDescriptorSet_TjPKj
             at /build/vulkan-validation-layers/src/Vulkan-ValidationLayers-1.2.182/layers/generated/chassis.cpp:2935:103
   8: ash::vk::features::DeviceFnV1_0::cmd_bind_descriptor_sets
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.32.1/src/vk/features.rs:5363:9
   9: ash::device::DeviceV1_0::cmd_bind_descriptor_sets
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.32.1/src/device.rs:1116:9
  10: kajiya_rg::pass_api::RenderPassApi::bind_pipeline_common
             at ./crates/lib/kajiya-rg/src/pass_api.rs:189:17
  11: kajiya_rg::pass_api::RenderPassApi::bind_compute_pipeline
             at ./crates/lib/kajiya-rg/src/pass_api.rs:116:9
  12: <kajiya::lut_renderers::BrdfFgLutComputer as kajiya::image_lut::ComputeImageLut>::compute::{{closure}}
             at ./crates/lib/kajiya/src/lut_renderers.rs:33:28
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /home/maik/.rustup/toolchains/1.51-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
  14: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /home/maik/.rustup/toolchains/1.51-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1521:9
  15: kajiya_rg::graph::CompiledRenderGraph::execute
             at ./crates/lib/kajiya-rg/src/graph.rs:804:17
  16: kajiya_rg::renderer::Renderer::draw_frame
             at ./crates/lib/kajiya-rg/src/renderer.rs:161:34
  17: kajiya_simple::main_loop::SimpleMainLoop::run::{{closure}}
             at ./crates/lib/kajiya-simple/src/main_loop.rs:320:29
  18: winit::platform_impl::platform::sticky_exit_callback
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.24.0/src/platform_impl/linux/mod.rs:736:5
  19: winit::platform_impl::platform::x11::EventLoop<T>::run_return
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.24.0/src/platform_impl/linux/x11/mod.rs:320:21
  20: winit::platform_impl::platform::EventLoop<T>::run_return
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.24.0/src/platform_impl/linux/mod.rs:645:56
  21: <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return
             at /home/maik/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.24.0/src/platform/run_return.rs:56:9
  22: kajiya_simple::main_loop::SimpleMainLoop::run
             at ./crates/lib/kajiya-simple/src/main_loop.rs:259:9
  23: view::main
             at ./crates/bin/view/src/main.rs:178:5
  24: core::ops::function::FnOnce::call_once
             at /home/maik/.rustup/toolchains/1.51-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@h3r2tic
Copy link
Collaborator

h3r2tic commented Sep 4, 2021

Thanks! Fixed in 08b632c.

@h3r2tic h3r2tic closed this as completed Sep 4, 2021
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

2 participants