From 30ee07391d9c5bd4d1b708771c85f9b601919397 Mon Sep 17 00:00:00 2001 From: Greggman Date: Wed, 30 Oct 2024 13:36:08 -0700 Subject: [PATCH] Make textureLoad/Gather/Compare not load weights (#4018) textureLoad and textureGather and textureGatherComapre do not use GPU mix weights so don't load them. This will make the these test run on Intel Mac compute stage where the weights are bad. --- .../execution/expression/call/builtin/texture_utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts index bd9e648b7478..350237459705 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts @@ -191,6 +191,9 @@ export function skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable( } } +const builtinNeedsMipGradientValues = (builtin: TextureBuiltin) => + builtin !== 'textureLoad' && builtin !== 'textureGather' && builtin !== 'textureGatherCompare'; + /** * Splits in array into multiple arrays where every Nth value goes to a different array */ @@ -2130,7 +2133,9 @@ export async function checkCallResults( gpuTexture?: GPUTexture ) { const stage = kShortShaderStageToShaderStage[shortShaderStage]; - await initMipGradientValuesForDevice(t, stage); + if (builtinNeedsMipGradientValues(calls[0].builtin)) { + await initMipGradientValuesForDevice(t, stage); + } let haveComparisonCheckInfo = false; let checkInfo = {