Skip to content

Commit 2e418e2

Browse files
Tweak buffer_texture_copies:sample_count (#4423)
Previously, the copy size did not span the entire texture, which violates both the requirement in "validating texture buffer copy" that the texture not be multisampled, and the requirement in "validating GPUTexelCopyTextureInfo" that a copy to a multisampled texture span a complete surface. This change makes the test more specific to the added requirement for texture-buffer copies. The other requirement for texture copies is checked by `validation,encoding,cmds,copyTextureToTexture:multisampled_copy_restrictions`.
1 parent adce7fa commit 2e418e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/webgpu/api/validation/image_copy/buffer_texture_copies.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,21 +325,21 @@ g.test('sample_count')
325325
if (sampleCount > 1) {
326326
usage |= GPUTextureUsage.RENDER_ATTACHMENT;
327327
}
328+
329+
const textureSize = { width: 16, height: 1, depthOrArrayLayers: 1 };
328330
const texture = t.createTextureTracked({
329-
size: { width: 16, height: 16 },
331+
size: textureSize,
330332
sampleCount,
331333
format: 'bgra8unorm',
332334
usage,
333335
});
334336

335-
const uploadBufferSize = 32;
337+
const uploadBufferSize = 64;
336338
const buffer = t.createBufferTracked({
337339
size: uploadBufferSize,
338340
usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST,
339341
});
340342

341-
const textureSize = { width: 1, height: 1, depthOrArrayLayers: 1 };
342-
343343
const isSuccess = sampleCount === 1;
344344

345345
if (copyType === 'CopyB2T') {

0 commit comments

Comments
 (0)