ITADN

Invalid HLSL for `textureSampleLevel` of 3d texture with offset

#9717Openandyleiserson 创建于 2026-06-20
type: bugarea: correctnessplatform: windowsarea: naga back-endnagalang: HLSL
A
andyleisersoncommented
The CTS test `webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_3d_coords:*` is failing in Firefox CTS runs on Windows (e.g. https://treeherder.mozilla.org/logviewer?job_id=573727807&repo=try&task=Smg3qltVSdawZ6aW2DCK_Q.0&lineNumber=67336) on the case `:stage="f";format="r8unorm";dim="3d";filt="linear";mode="c";offset=true` with HLSL compile errors: ``` [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - - EXCEPTION: Error: Unexpected internal error occurred: Internal error in ShaderStages(FRAGMENT) shader: DXC compile error: hlsl.hlsl:507:73: error: too many elements in vector initialization (expected 2 elements, have 3) [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - float4 call = T.SampleLevel(S, args.coords, args.mipLevel, int2(int3(int(-2), int(-3), int(-7)))); [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - ^ [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - hlsl.hlsl:507:25: error: no matching member function for call to 'SampleLevel' [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - float4 call = T.SampleLevel(S, args.coords, args.mipLevel, int2(int3(int(-2), int(-3), int(-7)))); [task 2026-06-18T21:29:32.463+00:00] 21:29:32 INFO - ~~^~~~~~~~~~~ [task 2026-06-18T21:29:32.464+00:00] 21:29:32 INFO - hlsl.hlsl:507:25: note: candidate function template not viable: requires 3 arguments, but 4 were provided [task 2026-06-18T21:29:32.464+00:00] 21:29:32 INFO - hlsl.hlsl:507:25: note: candidate function template not viable: requires 5 arguments, but 4 were provided [task 2026-06-18T21:29:32.464+00:00] 21:29:32 INFO - hlsl.hlsl:514:79: error: too many elements in vector initialization (expected 2 elements, have 3) [task 2026-06-18T21:29:32.464+00:00] 21:29:32 INFO - float4 call_1 = T.SampleLevel(S, args_1.coords, args_1.mipLevel, int2(int3(int(0), int(-4), int(-4)))); ``` I haven't run this in wgpu cts_runner on Windows, but it seems unlikely that this is Firefox-specific.
0 条评论