Wgpu: Validation error DescriptorSetNotBound when using (compute-)pipline without push constants after one with

Created on 19 Jul 2020  路  4Comments  路  Source: gfx-rs/wgpu

The moment I start using push constants in a compute pipeline, some (unclear what's necessary for that) following compute pipelines (in the same pass) that don't use push constants will give me this validation error:

  VALIDATION [UNASSIGNED-CoreValidation-DrawState-DescriptorSetNotBound (-840888189)] : Validation Error: [ UNASSIGNED-CoreValidation-DrawState-DescriptorSetNotBound ] Object 0: handle = 0x1928a4a6530, name = Encoder: Frame Main, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xcde11083 | VkPipeline 0xa7e05300000000d6[] uses set gfx-rs/wgpu-rs#1 but that set is not bound.
    object info: (type: COMMAND_BUFFER, hndl: 1728896984368, name: Encoder: Frame Main)

everything else equal, the moment I stop using push constants the problem goes away again

After the validation error the app gets stuck.
I created a trace by running it in an optimized build (no validation error) which seems to run fine. Resulting trace has a lot of noise, but the player is able to repro the issue for me (using wgpu-core a0ed09a6a83dc0d16c6ad711cf139a5fcfbb9c35)

trace.zip

bug

All 4 comments

Figured out in the matrix.org chat together with @cwfitzgerald that the issue is that reset_expectations is used incorrectly here https://github.com/gfx-rs/wgpu/blob/master/wgpu-core/src/command/compute.rs#L257

Specifically it isn't called correctly when push constant ranges are changed. It likely needs to be called with a value of 0 for length when push constants are different. Then the rest of the code likely will be the same. I need to muse over this a bit more (and add a test for it [wooo api trace tests!!!]).

Whoops this shouldn't have closed it.

Fix confirmed with the latest incarnation of @cwfitzgerald fix PR!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fintelia picture fintelia  路  23Comments

FlorianUekermann picture FlorianUekermann  路  18Comments

YuuriMomo picture YuuriMomo  路  18Comments

kvark picture kvark  路  11Comments

cwfitzgerald picture cwfitzgerald  路  20Comments