Skip to content

Missing validation for buffer<->texture copies #7936

@andyleiserson

Description

@andyleiserson

This was recently added to the CTS and the test (api,validation,image_copy,buffer_texture_copies:offset_and_bytesPerRow) is failing with a panic:

thread 'main' panicked at wgpu-core/src/command/memory_init.rs:233:17:
Buffer Buffer { raw: <AGXG13XFamilyBuffer: 0x145617980>
    label = buffer(66)
    length = 68
    cpuCacheMode = MTLCPUCacheModeDefaultCache
    storageMode = MTLStorageModePrivate
    hazardTrackingMode = MTLHazardTrackingModeTracked
    resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModePrivate MTLResourceHazardTrackingModeTracked
    purgeableState = MTLPurgeableStateNonVolatile, size: 68 } has an uninitialized range with a start not aligned to 4 (start was 2)
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/e71f9a9a98b0faf423844bf0ba7438f29dc27d58/library/core/src/panicking.rs:76:14
   2: wgpu_core::command::memory_init::<impl wgpu_core::command::BakedCommands>::initialize_buffer_memory
             at /Users/Andy/Development/wgpu/wgpu-core/src/command/memory_init.rs:233:17
   3: wgpu_core::device::queue::Queue::submit
             at /Users/Andy/Development/wgpu/wgpu-core/src/device/queue.rs:1227:41
   4: wgpu_core::device::queue::<impl wgpu_core::global::Global>::queue_submit
             at /Users/Andy/Development/wgpu/wgpu-core/src/device/queue.rs:1651:9

Metadata

Metadata

Assignees

Labels

area: ctsIssues stemming from the WebGPU Conformance Test Suitearea: validationIssues related to validation, diagnostics, and error handlingtype: bugSomething isn't workingtype: crashIssues involving a crash or panic

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions