Skip to content

Commit 58c5185

Browse files
ErichDonGublergreggman
authored andcommitted
fix: properly apply bindTextureResource in render_pass_descriptor:one_*_attachment tests (gpuweb#4447)
This is a bug in gpuweb#4407, where this coverage was originally intended to be introduced.
1 parent 866230f commit 58c5185

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/webgpu/api/validation/render_pass/render_pass_descriptor.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ g.test('attachments,one_color_attachment')
115115
.desc(`Test that a render pass works with only one color attachment.`)
116116
.paramsSubcasesOnly(u => u.combine('bindTextureResource', [false, true] as const))
117117
.fn(t => {
118+
const { bindTextureResource } = t.params;
118119
const colorTexture = t.createTestTexture({ format: 'rgba8unorm' });
119120
const descriptor = {
120-
colorAttachments: [t.getColorAttachment(colorTexture)],
121+
colorAttachments: [t.getColorAttachment(colorTexture, { bindTextureResource })],
121122
};
122123

123124
t.tryRenderPass(true, descriptor);
@@ -127,10 +128,13 @@ g.test('attachments,one_depth_stencil_attachment')
127128
.desc(`Test that a render pass works with only one depthStencil attachment.`)
128129
.paramsSubcasesOnly(u => u.combine('bindTextureResource', [false, true] as const))
129130
.fn(t => {
131+
const { bindTextureResource } = t.params;
130132
const depthStencilTexture = t.createTestTexture({ format: 'depth24plus-stencil8' });
131133
const descriptor = {
132134
colorAttachments: [],
133-
depthStencilAttachment: t.getDepthStencilAttachment(depthStencilTexture),
135+
depthStencilAttachment: t.getDepthStencilAttachment(depthStencilTexture, {
136+
bindTextureResource,
137+
}),
134138
};
135139

136140
t.tryRenderPass(true, descriptor);

0 commit comments

Comments
 (0)