Skip to content

Commit 6b56a20

Browse files
authored
Fix textureSampleCompareLevel sample point code. (gpuweb#4194)
This is bug that surfaced only if the test failed. The issue is that textureSampleLevel, which it uses when textureSampleCompareLevel fails, needs the level parameter to be i32/u32 when the texture is a depth texture. Again, this only happens when we already know the test failed so this doesn't affect pass/fail. It only affects getting the sample points.
1 parent 5d70ace commit 6b56a20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,7 @@ export async function checkCallResults<T extends Dimensionality>(
25672567
break;
25682568
case 'textureSampleCompareLevel':
25692569
debugCall.builtin = 'textureSampleLevel';
2570-
debugCall.levelType = 'f';
2570+
debugCall.levelType = 'u';
25712571
debugCall.mipLevel = 0;
25722572
break;
25732573
default:

0 commit comments

Comments
 (0)