Bug 1824871 Comment 10 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The assertion is reporting that an attempt to deserialize an ID failed because its value was zero. Specifically, this call to `NonZeroId::new` is returning `None`:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/third_party/rust/wgpu-core/src/id.rs#188
```rust
Id(NonZeroId::new(v).unwrap(), PhantomData)
```

That is invoked from the attempt to deserialize a `wgpu_core::device::trace::Command` here:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/gfx/wgpu_bindings/src/server.rs#707
```rust
let action = bincode::deserialize(byte_buf.as_slice()).unwrap();
```

I don't exactly know which id is zero yet, but I suspect it's the texture view's, because we're getting the following error from the Vulkan validation layers:

```
[ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkImageViewCreateInfo-image-04441 (0xb75da543)]
    	Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ] Object 0: handle = 0x80000000008, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xb75da543 | Invalid usage flag for VkImage 0x80000000008[] used by vkCreateImageView(). In this case, VkImage should have VK_IMAGE_USAGE_[SAMPLED|STORAGE|COLOR_ATTACHMENT|DEPTH_STENCIL_ATTACHMENT|INPUT_ATTACHMENT|TRANSIENT_ATTACHMENT|SHADING_RATE_IMAGE|FRAGMENT_DENSITY_MAP]_BIT set during creation. The Vulkan spec states: image must have been created with a usage value containing at least one of the usages defined in the valid image usage list for image views (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-04441)
[ERROR wgpu_hal::vulkan::instance] 	objects: (type: IMAGE, hndl: 0x80000000008, name: ?)
```
The assertion is reporting that an attempt to deserialize an ID failed because its value was zero. Specifically, this call to `NonZeroId::new` is returning `None`:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/third_party/rust/wgpu-core/src/id.rs#188
```rust
Id(NonZeroId::new(v).unwrap(), PhantomData)
```

That is invoked from the attempt to deserialize a `wgpu_core::device::trace::Command` here:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/gfx/wgpu_bindings/src/server.rs#707
```rust
let action = bincode::deserialize(byte_buf.as_slice()).unwrap();
```

I don't exactly know which id is zero yet, but I suspect it's the texture view's, because we're getting the following error from the Vulkan validation layers (reformatted for legibility):

```
[ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkImageViewCreateInfo-image-04441 (0xb75da543)]
  Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ] Object 0: handle = 0x80000000008, type = VK_OBJECT_TYPE_IMAGE;
  | MessageID = 0xb75da543
  | Invalid usage flag for VkImage 0x80000000008[] used by vkCreateImageView().
    In this case, VkImage should have VK_IMAGE_USAGE_[SAMPLED|STORAGE|COLOR_ATTACHMENT|
    DEPTH_STENCIL_ATTACHMENT|INPUT_ATTACHMENT|TRANSIENT_ATTACHMENT|SHADING_RATE_IMAGE|
    FRAGMENT_DENSITY_MAP]_BIT set during creation. The Vulkan spec states: image must have been
    created with a usage value containing at least one of the usages defined in the valid image
    usage list for image views
    (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-04441)
[ERROR wgpu_hal::vulkan::instance] 	objects: (type: IMAGE, hndl: 0x80000000008, name: ?)
```
The assertion is reporting that an attempt to deserialize an ID failed because its value was zero. Specifically, this call to `NonZeroId::new` is returning `None`:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/third_party/rust/wgpu-core/src/id.rs#188
```rust
Id(NonZeroId::new(v).unwrap(), PhantomData)
```

That is invoked from the attempt to deserialize a `wgpu_core::device::trace::Command` here:

https://searchfox.org/mozilla-central/rev/54c533e94ae786056a43231f230c7d9b0773cb80/gfx/wgpu_bindings/src/server.rs#707
```rust
let action = bincode::deserialize(byte_buf.as_slice()).unwrap();
```

I don't exactly know which id is zero yet, but I suspect it's the texture view's, because we're getting the following error from the Vulkan validation layers (reformatted for legibility):

```
[ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkImageViewCreateInfo-image-04441 (0xb75da543)]
  Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ]
  Object 0: handle = 0x80000000008, type = VK_OBJECT_TYPE_IMAGE;
  | MessageID = 0xb75da543
  | Invalid usage flag for VkImage 0x80000000008[] used by vkCreateImageView().
    In this case, VkImage should have VK_IMAGE_USAGE_[SAMPLED|STORAGE|COLOR_ATTACHMENT|
    DEPTH_STENCIL_ATTACHMENT|INPUT_ATTACHMENT|TRANSIENT_ATTACHMENT|SHADING_RATE_IMAGE|
    FRAGMENT_DENSITY_MAP]_BIT set during creation. The Vulkan spec states: image must have been
    created with a usage value containing at least one of the usages defined in the valid image
    usage list for image views
    (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-image-04441)
[ERROR wgpu_hal::vulkan::instance] 	objects: (type: IMAGE, hndl: 0x80000000008, name: ?)
```
(deleted; commented on wrong bug)

Back to Bug 1824871 Comment 10