Skip to content

write_texture to a subsection of a texture on the Dx12 backend without first writing to the whole texture appears to do nothing #1306

@Imberflur

Description

@Imberflur

Description
write_texture for a subsection of a texture appears to do nothing on the Dx12 backend unless the whole texture was first written to. (debugging to show that subsection writes work after writing to the whole texture not detailed here)

Repro steps
Apply diff to wgpu-rs and run cube example with WGPU_BACKEND=dx12
(let me know and I can create branches for this and future issues)

diff --git a/examples/cube/main.rs b/examples/cube/main.rs
index 983dde1..cb60e3e 100644
--- a/examples/cube/main.rs
+++ b/examples/cube/main.rs
@@ -207,7 +207,11 @@ impl framework::Example for Example {
                 bytes_per_row: Some(std::num::NonZeroU32::new(4 * size).unwrap()),
                 rows_per_image: None,
             },
-            texture_extent,
+            wgpu::Extent3d {
+                height: texture_extent.height / 2,
+                width: texture_extent.width / 2,
+                ..texture_extent
+            },
         );

         // Create other resources

Expected vs observed behavior
Expected (produced via Vulkan backend):
image
Observed:
image

Extra materials
none (let me know if an api trace is useful for this and I can get one)

Platform
Windows 10, wgpu-rs: 82b7068, GPU: AMD Radeon(TM) Vega 3 Graphics

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: dx12Issues with DX12 or DXGIexternal: driver-bugA driver is causing the bug, though we may still want to work around ittype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions