Skip to content

Commit

Permalink
Fix bug: fragment output type mismatch (#4158)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao authored Jan 23, 2025
1 parent 5f26401 commit 1e8a378
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ function getPipelineDescriptor(
return;
}

const typedVec = interleaveFormat.includes('uint') ? 'vec4u' : 'vec4f';

const code = `
${getDescription(testValue, actualLimit, sampleCount, targets)}
@vertex fn vs() -> @builtin(position) vec4f {
return vec4f(0);
}
@fragment fn fs() -> @location(0) vec4f {
return vec4f(0);
@fragment fn fs() -> @location(0) ${typedVec} {
return ${typedVec}(0);
}
`;
const module = device.createShaderModule({ code });
Expand Down

0 comments on commit 1e8a378

Please sign in to comment.