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)
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!