fix: Choose f32 when trying to find a type common with abstractFloat and i32 (or u32)#2396
Open
fix: Choose f32 when trying to find a type common with abstractFloat and i32 (or u32)#2396
f32 when trying to find a type common with abstractFloat and i32 (or u32)#2396Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:
Dynamic test results:
|
| Test | tsdown |
|---|---|
| extensionEnabled from typegpustd.ts | 12.32 kB ( |
| range from typegpustd.ts | 12.59 kB ( |
| bool from typegpudata.ts | 10.78 kB ( |
| f16 from typegpudata.ts | 10.78 kB ( |
| f32 from typegpudata.ts | 10.78 kB ( |
| i32 from typegpudata.ts | 10.78 kB ( |
| u32 from typegpudata.ts | 10.78 kB ( |
| u16 from typegpudata.ts | 10.80 kB ( |
| disarrayOf from typegpudata.ts | 12.76 kB ( |
| textureDepth2d from typegpudata.ts | 11.22 kB ( |
| arrayLength from typegpustd.ts | 12.23 kB ( |
| textureDepthCube from typegpudata.ts | 11.23 kB ( |
| texture1d from typegpudata.ts | 11.23 kB ( |
| texture2d from typegpudata.ts | 11.23 kB ( |
| texture3d from typegpudata.ts | 11.23 kB ( |
| textureCube from typegpudata.ts | 11.24 kB ( |
| textureDepth2dArray from typegpudata.ts | 11.24 kB ( |
| textureDepthCubeArray from typegpudata.ts | 11.25 kB ( |
| textureDepthMultisampled2d from typegpudata.ts | 11.25 kB ( |
| texture2dArray from typegpudata.ts | 11.25 kB ( |
| textureCubeArray from typegpudata.ts | 11.26 kB ( |
| textureMultisampled2d from typegpudata.ts | 11.26 kB ( |
| discard from typegpustd.ts | 11.98 kB ( |
| dpdx from typegpustd.ts | 12.83 kB ( |
| dpdxCoarse from typegpustd.ts | 12.83 kB ( |
| dpdxFine from typegpustd.ts | 12.83 kB ( |
| dpdyCoarse from typegpustd.ts | 12.83 kB ( |
| dpdyFine from typegpustd.ts | 12.83 kB ( |
| dpdy from typegpustd.ts | 12.83 kB ( |
| fwidthCoarse from typegpustd.ts | 12.83 kB ( |
| fwidthFine from typegpustd.ts | 12.83 kB ( |
| fwidth from typegpustd.ts | 12.83 kB ( |
| atomicLoad from typegpustd.ts | 13.58 kB ( |
| atomicStore from typegpustd.ts | 13.59 kB ( |
| textureBarrier from typegpustd.ts | 13.59 kB ( |
| atomicAdd from typegpustd.ts | 13.60 kB ( |
| atomicAnd from typegpustd.ts | 13.60 kB ( |
| atomicMax from typegpustd.ts | 13.60 kB ( |
| atomicMin from typegpustd.ts | 13.60 kB ( |
| atomicOr from typegpustd.ts | 13.60 kB ( |
| atomicSub from typegpustd.ts | 13.60 kB ( |
| atomicXor from typegpustd.ts | 13.60 kB ( |
| storageBarrier from typegpustd.ts | 13.60 kB ( |
| workgroupBarrier from typegpustd.ts | 13.60 kB ( |
| vec2b from typegpudata.ts | 17.19 kB ( |
| vec2f from typegpudata.ts | 17.19 kB ( |
| vec2h from typegpudata.ts | 17.19 kB ( |
| vec2i from typegpudata.ts | 17.19 kB ( |
| vec2u from typegpudata.ts | 17.19 kB ( |
| vec3b from typegpudata.ts | 17.19 kB ( |
| vec3f from typegpudata.ts | 17.19 kB ( |
| vec3h from typegpudata.ts | 17.19 kB ( |
| vec3i from typegpudata.ts | 17.19 kB ( |
| vec3u from typegpudata.ts | 17.19 kB ( |
| vec4b from typegpudata.ts | 17.19 kB ( |
| vec4f from typegpudata.ts | 17.19 kB ( |
| vec4h from typegpudata.ts | 17.19 kB ( |
| vec4i from typegpudata.ts | 17.19 kB ( |
| vec4u from typegpudata.ts | 17.19 kB ( |
| formatToWGSLType from typegpudata.ts | 18.68 kB ( |
| uint8 from typegpudata.ts | 18.68 kB ( |
| float16 from typegpudata.ts | 18.69 kB ( |
| float16x2 from typegpudata.ts | 18.69 kB ( |
| float16x4 from typegpudata.ts | 18.69 kB ( |
| float32 from typegpudata.ts | 18.69 kB ( |
| float32x2 from typegpudata.ts | 18.69 kB ( |
| float32x3 from typegpudata.ts | 18.69 kB ( |
| float32x4 from typegpudata.ts | 18.69 kB ( |
| sint16 from typegpudata.ts | 18.69 kB ( |
| sint16x2 from typegpudata.ts | 18.69 kB ( |
| sint16x4 from typegpudata.ts | 18.69 kB ( |
| sint32 from typegpudata.ts | 18.69 kB ( |
| sint32x2 from typegpudata.ts | 18.69 kB ( |
| sint32x3 from typegpudata.ts | 18.69 kB ( |
| sint32x4 from typegpudata.ts | 18.69 kB ( |
| sint8 from typegpudata.ts | 18.69 kB ( |
| sint8x2 from typegpudata.ts | 18.69 kB ( |
| sint8x4 from typegpudata.ts | 18.69 kB ( |
| snorm16 from typegpudata.ts | 18.69 kB ( |
| snorm16x2 from typegpudata.ts | 18.69 kB ( |
| snorm16x4 from typegpudata.ts | 18.69 kB ( |
| snorm8 from typegpudata.ts | 18.69 kB ( |
| snorm8x2 from typegpudata.ts | 18.69 kB ( |
| snorm8x4 from typegpudata.ts | 18.69 kB ( |
| uint16 from typegpudata.ts | 18.69 kB ( |
| uint16x2 from typegpudata.ts | 18.69 kB ( |
| uint16x4 from typegpudata.ts | 18.69 kB ( |
| uint32 from typegpudata.ts | 18.69 kB ( |
| uint32x2 from typegpudata.ts | 18.69 kB ( |
| uint32x3 from typegpudata.ts | 18.69 kB ( |
| uint32x4 from typegpudata.ts | 18.69 kB ( |
| uint8x2 from typegpudata.ts | 18.69 kB ( |
| uint8x4 from typegpudata.ts | 18.69 kB ( |
| unorm10 10 10 2 from typegpudata.ts | 18.69 kB ( |
| unorm16 from typegpudata.ts | 18.69 kB ( |
| unorm16x2 from typegpudata.ts | 18.69 kB ( |
| unorm16x4 from typegpudata.ts | 18.69 kB ( |
| unorm8 from typegpudata.ts | 18.69 kB ( |
| unorm8x2 from typegpudata.ts | 18.69 kB ( |
| unorm8x4 bgra from typegpudata.ts | 18.69 kB ( |
| unorm8x4 from typegpudata.ts | 18.69 kB ( |
| packedFormats from typegpudata.ts | 18.71 kB ( |
| isPackedData from typegpudata.ts | 18.75 kB ( |
| alignmentOf from typegpudata.ts | 19.73 kB ( |
| subgroupAdd from typegpustd.ts | 21.76 kB ( |
| subgroupAll from typegpustd.ts | 21.76 kB ( |
| subgroupAnd from typegpustd.ts | 21.76 kB ( |
| subgroupAny from typegpustd.ts | 21.76 kB ( |
| subgroupBallot from typegpustd.ts | 21.76 kB ( |
| subgroupBroadcastFirst from typegpustd.ts | 21.76 kB ( |
| subgroupBroadcast from typegpustd.ts | 21.76 kB ( |
| subgroupElect from typegpustd.ts | 21.76 kB ( |
| subgroupExclusiveAdd from typegpustd.ts | 21.76 kB ( |
| subgroupExclusiveMul from typegpustd.ts | 21.76 kB ( |
| subgroupInclusiveAdd from typegpustd.ts | 21.76 kB ( |
| subgroupInclusiveMul from typegpustd.ts | 21.76 kB ( |
| subgroupMax from typegpustd.ts | 21.76 kB ( |
| subgroupMin from typegpustd.ts | 21.76 kB ( |
| subgroupMul from typegpustd.ts | 21.76 kB ( |
| subgroupOr from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleDown from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleUp from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleXor from typegpustd.ts | 21.76 kB ( |
| subgroupShuffle from typegpustd.ts | 21.76 kB ( |
| subgroupXor from typegpustd.ts | 21.76 kB ( |
| isBuiltin from typegpudata.ts | 22.45 kB ( |
| sizeOf from typegpudata.ts | 22.50 kB ( |
| isContiguous from typegpudata.ts | 22.51 kB ( |
| getLongestContiguousPrefix from typegpudata.ts | 22.52 kB ( |
| textureDimensions from typegpustd.ts | 23.51 kB ( |
| textureGather from typegpustd.ts | 23.51 kB ( |
| textureLoad from typegpustd.ts | 23.52 kB ( |
| textureSampleBaseClampToEdge from typegpustd.ts | 23.52 kB ( |
| textureSampleBias from typegpustd.ts | 23.52 kB ( |
| textureSampleCompareLevel from typegpustd.ts | 23.52 kB ( |
| textureSampleCompare from typegpustd.ts | 23.52 kB ( |
| textureSampleGrad from typegpustd.ts | 23.52 kB ( |
| textureSampleLevel from typegpustd.ts | 23.52 kB ( |
| textureSample from typegpustd.ts | 23.52 kB ( |
| textureStore from typegpustd.ts | 23.52 kB ( |
| arrayOf from typegpudata.ts | 24.00 kB ( |
| size from typegpudata.ts | 24.19 kB ( |
| align from typegpudata.ts | 24.19 kB ( |
| location from typegpudata.ts | 24.19 kB ( |
| interpolate from typegpudata.ts | 24.20 kB ( |
| invariant from typegpudata.ts | 24.57 kB ( |
| mat4x4f from typegpudata.ts | 24.71 kB ( |
| identity2 from typegpustd.ts | 24.71 kB ( |
| identity3 from typegpustd.ts | 24.71 kB ( |
| identity4 from typegpustd.ts | 24.71 kB ( |
| mat2x2f from typegpudata.ts | 24.71 kB ( |
| mat3x3f from typegpudata.ts | 24.71 kB ( |
| rotationX4 from typegpustd.ts | 24.71 kB ( |
| rotationY4 from typegpustd.ts | 24.71 kB ( |
| rotationZ4 from typegpustd.ts | 24.71 kB ( |
| scaling4 from typegpustd.ts | 24.71 kB ( |
| translation4 from typegpustd.ts | 24.71 kB ( |
| matToArray from typegpudata.ts | 24.84 kB ( |
| builtin from typegpudata.ts | 26.37 kB ( |
| pack2x16float from typegpustd.ts | 33.72 kB ( |
| pack4x8unorm from typegpustd.ts | 33.72 kB ( |
| unpack2x16float from typegpustd.ts | 33.72 kB ( |
| unpack4x8unorm from typegpustd.ts | 33.72 kB ( |
📋 All results
Click to reveal the results table (350 entries).
| Test | tsdown |
|---|---|
| extensionEnabled from typegpustd.ts | 12.32 kB ( |
| range from typegpustd.ts | 12.59 kB ( |
| bool from typegpudata.ts | 10.78 kB ( |
| f16 from typegpudata.ts | 10.78 kB ( |
| f32 from typegpudata.ts | 10.78 kB ( |
| i32 from typegpudata.ts | 10.78 kB ( |
| u32 from typegpudata.ts | 10.78 kB ( |
| u16 from typegpudata.ts | 10.80 kB ( |
| disarrayOf from typegpudata.ts | 12.76 kB ( |
| textureDepth2d from typegpudata.ts | 11.22 kB ( |
| arrayLength from typegpustd.ts | 12.23 kB ( |
| textureDepthCube from typegpudata.ts | 11.23 kB ( |
| texture1d from typegpudata.ts | 11.23 kB ( |
| texture2d from typegpudata.ts | 11.23 kB ( |
| texture3d from typegpudata.ts | 11.23 kB ( |
| textureCube from typegpudata.ts | 11.24 kB ( |
| textureDepth2dArray from typegpudata.ts | 11.24 kB ( |
| textureDepthCubeArray from typegpudata.ts | 11.25 kB ( |
| textureDepthMultisampled2d from typegpudata.ts | 11.25 kB ( |
| texture2dArray from typegpudata.ts | 11.25 kB ( |
| textureCubeArray from typegpudata.ts | 11.26 kB ( |
| textureMultisampled2d from typegpudata.ts | 11.26 kB ( |
| discard from typegpustd.ts | 11.98 kB ( |
| dpdx from typegpustd.ts | 12.83 kB ( |
| dpdxCoarse from typegpustd.ts | 12.83 kB ( |
| dpdxFine from typegpustd.ts | 12.83 kB ( |
| dpdyCoarse from typegpustd.ts | 12.83 kB ( |
| dpdyFine from typegpustd.ts | 12.83 kB ( |
| dpdy from typegpustd.ts | 12.83 kB ( |
| fwidthCoarse from typegpustd.ts | 12.83 kB ( |
| fwidthFine from typegpustd.ts | 12.83 kB ( |
| fwidth from typegpustd.ts | 12.83 kB ( |
| atomicLoad from typegpustd.ts | 13.58 kB ( |
| atomicStore from typegpustd.ts | 13.59 kB ( |
| textureBarrier from typegpustd.ts | 13.59 kB ( |
| atomicAdd from typegpustd.ts | 13.60 kB ( |
| atomicAnd from typegpustd.ts | 13.60 kB ( |
| atomicMax from typegpustd.ts | 13.60 kB ( |
| atomicMin from typegpustd.ts | 13.60 kB ( |
| atomicOr from typegpustd.ts | 13.60 kB ( |
| atomicSub from typegpustd.ts | 13.60 kB ( |
| atomicXor from typegpustd.ts | 13.60 kB ( |
| storageBarrier from typegpustd.ts | 13.60 kB ( |
| workgroupBarrier from typegpustd.ts | 13.60 kB ( |
| vec2b from typegpudata.ts | 17.19 kB ( |
| vec2f from typegpudata.ts | 17.19 kB ( |
| vec2h from typegpudata.ts | 17.19 kB ( |
| vec2i from typegpudata.ts | 17.19 kB ( |
| vec2u from typegpudata.ts | 17.19 kB ( |
| vec3b from typegpudata.ts | 17.19 kB ( |
| vec3f from typegpudata.ts | 17.19 kB ( |
| vec3h from typegpudata.ts | 17.19 kB ( |
| vec3i from typegpudata.ts | 17.19 kB ( |
| vec3u from typegpudata.ts | 17.19 kB ( |
| vec4b from typegpudata.ts | 17.19 kB ( |
| vec4f from typegpudata.ts | 17.19 kB ( |
| vec4h from typegpudata.ts | 17.19 kB ( |
| vec4i from typegpudata.ts | 17.19 kB ( |
| vec4u from typegpudata.ts | 17.19 kB ( |
| formatToWGSLType from typegpudata.ts | 18.68 kB ( |
| uint8 from typegpudata.ts | 18.68 kB ( |
| float16 from typegpudata.ts | 18.69 kB ( |
| float16x2 from typegpudata.ts | 18.69 kB ( |
| float16x4 from typegpudata.ts | 18.69 kB ( |
| float32 from typegpudata.ts | 18.69 kB ( |
| float32x2 from typegpudata.ts | 18.69 kB ( |
| float32x3 from typegpudata.ts | 18.69 kB ( |
| float32x4 from typegpudata.ts | 18.69 kB ( |
| sint16 from typegpudata.ts | 18.69 kB ( |
| sint16x2 from typegpudata.ts | 18.69 kB ( |
| sint16x4 from typegpudata.ts | 18.69 kB ( |
| sint32 from typegpudata.ts | 18.69 kB ( |
| sint32x2 from typegpudata.ts | 18.69 kB ( |
| sint32x3 from typegpudata.ts | 18.69 kB ( |
| sint32x4 from typegpudata.ts | 18.69 kB ( |
| sint8 from typegpudata.ts | 18.69 kB ( |
| sint8x2 from typegpudata.ts | 18.69 kB ( |
| sint8x4 from typegpudata.ts | 18.69 kB ( |
| snorm16 from typegpudata.ts | 18.69 kB ( |
| snorm16x2 from typegpudata.ts | 18.69 kB ( |
| snorm16x4 from typegpudata.ts | 18.69 kB ( |
| snorm8 from typegpudata.ts | 18.69 kB ( |
| snorm8x2 from typegpudata.ts | 18.69 kB ( |
| snorm8x4 from typegpudata.ts | 18.69 kB ( |
| uint16 from typegpudata.ts | 18.69 kB ( |
| uint16x2 from typegpudata.ts | 18.69 kB ( |
| uint16x4 from typegpudata.ts | 18.69 kB ( |
| uint32 from typegpudata.ts | 18.69 kB ( |
| uint32x2 from typegpudata.ts | 18.69 kB ( |
| uint32x3 from typegpudata.ts | 18.69 kB ( |
| uint32x4 from typegpudata.ts | 18.69 kB ( |
| uint8x2 from typegpudata.ts | 18.69 kB ( |
| uint8x4 from typegpudata.ts | 18.69 kB ( |
| unorm10 10 10 2 from typegpudata.ts | 18.69 kB ( |
| unorm16 from typegpudata.ts | 18.69 kB ( |
| unorm16x2 from typegpudata.ts | 18.69 kB ( |
| unorm16x4 from typegpudata.ts | 18.69 kB ( |
| unorm8 from typegpudata.ts | 18.69 kB ( |
| unorm8x2 from typegpudata.ts | 18.69 kB ( |
| unorm8x4 bgra from typegpudata.ts | 18.69 kB ( |
| unorm8x4 from typegpudata.ts | 18.69 kB ( |
| packedFormats from typegpudata.ts | 18.71 kB ( |
| isPackedData from typegpudata.ts | 18.75 kB ( |
| alignmentOf from typegpudata.ts | 19.73 kB ( |
| subgroupAdd from typegpustd.ts | 21.76 kB ( |
| subgroupAll from typegpustd.ts | 21.76 kB ( |
| subgroupAnd from typegpustd.ts | 21.76 kB ( |
| subgroupAny from typegpustd.ts | 21.76 kB ( |
| subgroupBallot from typegpustd.ts | 21.76 kB ( |
| subgroupBroadcastFirst from typegpustd.ts | 21.76 kB ( |
| subgroupBroadcast from typegpustd.ts | 21.76 kB ( |
| subgroupElect from typegpustd.ts | 21.76 kB ( |
| subgroupExclusiveAdd from typegpustd.ts | 21.76 kB ( |
| subgroupExclusiveMul from typegpustd.ts | 21.76 kB ( |
| subgroupInclusiveAdd from typegpustd.ts | 21.76 kB ( |
| subgroupInclusiveMul from typegpustd.ts | 21.76 kB ( |
| subgroupMax from typegpustd.ts | 21.76 kB ( |
| subgroupMin from typegpustd.ts | 21.76 kB ( |
| subgroupMul from typegpustd.ts | 21.76 kB ( |
| subgroupOr from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleDown from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleUp from typegpustd.ts | 21.76 kB ( |
| subgroupShuffleXor from typegpustd.ts | 21.76 kB ( |
| subgroupShuffle from typegpustd.ts | 21.76 kB ( |
| subgroupXor from typegpustd.ts | 21.76 kB ( |
| isBuiltin from typegpudata.ts | 22.45 kB ( |
| dataImportOneDirect.ts | 22.50 kB ( |
| dataImportOneStar.ts | 22.50 kB ( |
| sizeOf from typegpudata.ts | 22.50 kB ( |
| isContiguous from typegpudata.ts | 22.51 kB ( |
| getLongestContiguousPrefix from typegpudata.ts | 22.52 kB ( |
| textureDimensions from typegpustd.ts | 23.51 kB ( |
| textureGather from typegpustd.ts | 23.51 kB ( |
| textureLoad from typegpustd.ts | 23.52 kB ( |
| textureSampleBaseClampToEdge from typegpustd.ts | 23.52 kB ( |
| textureSampleBias from typegpustd.ts | 23.52 kB ( |
| textureSampleCompareLevel from typegpustd.ts | 23.52 kB ( |
| textureSampleCompare from typegpustd.ts | 23.52 kB ( |
| textureSampleGrad from typegpustd.ts | 23.52 kB ( |
| textureSampleLevel from typegpustd.ts | 23.52 kB ( |
| textureSample from typegpustd.ts | 23.52 kB ( |
| textureStore from typegpustd.ts | 23.52 kB ( |
| arrayOf from typegpudata.ts | 24.00 kB ( |
| size from typegpudata.ts | 24.19 kB ( |
| align from typegpudata.ts | 24.19 kB ( |
| location from typegpudata.ts | 24.19 kB ( |
| interpolate from typegpudata.ts | 24.20 kB ( |
| invariant from typegpudata.ts | 24.57 kB ( |
| mat4x4f from typegpudata.ts | 24.71 kB ( |
| identity2 from typegpustd.ts | 24.71 kB ( |
| identity3 from typegpustd.ts | 24.71 kB ( |
| identity4 from typegpustd.ts | 24.71 kB ( |
| mat2x2f from typegpudata.ts | 24.71 kB ( |
| mat3x3f from typegpudata.ts | 24.71 kB ( |
| rotationX4 from typegpustd.ts | 24.71 kB ( |
| rotationY4 from typegpustd.ts | 24.71 kB ( |
| rotationZ4 from typegpustd.ts | 24.71 kB ( |
| scaling4 from typegpustd.ts | 24.71 kB ( |
| translation4 from typegpustd.ts | 24.71 kB ( |
| matToArray from typegpudata.ts | 24.84 kB ( |
| builtin from typegpudata.ts | 26.37 kB ( |
| pack2x16float from typegpustd.ts | 33.72 kB ( |
| pack4x8unorm from typegpustd.ts | 33.72 kB ( |
| unpack2x16float from typegpustd.ts | 33.72 kB ( |
| unpack4x8unorm from typegpustd.ts | 33.72 kB ( |
| memoryLayoutOf from typegpudata.ts | 39.82 kB ( |
| bitcastU32toF32 from typegpustd.ts | 41.91 kB ( |
| bitcastU32toI32 from typegpustd.ts | 41.91 kB ( |
| neg from typegpustd.ts | 46.08 kB ( |
| add from typegpustd.ts | 46.08 kB ( |
| bitShiftLeft from typegpustd.ts | 46.08 kB ( |
| bitShiftRight from typegpustd.ts | 46.08 kB ( |
| div from typegpustd.ts | 46.08 kB ( |
| mod from typegpustd.ts | 46.08 kB ( |
| mul from typegpustd.ts | 46.08 kB ( |
| sub from typegpustd.ts | 46.08 kB ( |
| stdImportOneDirect.ts | 46.09 kB ( |
| stdImportOneStar.ts | 46.09 kB ( |
| rotateX4 from typegpustd.ts | 46.84 kB ( |
| scale4 from typegpustd.ts | 46.84 kB ( |
| translate4 from typegpustd.ts | 46.84 kB ( |
| rotateY4 from typegpustd.ts | 46.85 kB ( |
| rotateZ4 from typegpustd.ts | 46.85 kB ( |
| and from typegpustd.ts | 49.02 kB ( |
| or from typegpustd.ts | 49.02 kB ( |
| allEq from typegpustd.ts | 49.03 kB ( |
| all from typegpustd.ts | 49.03 kB ( |
| eq from typegpustd.ts | 49.03 kB ( |
| lt from typegpustd.ts | 49.03 kB ( |
| ne from typegpustd.ts | 49.03 kB ( |
| not from typegpustd.ts | 49.03 kB ( |
| any from typegpustd.ts | 49.03 kB ( |
| ge from typegpustd.ts | 49.03 kB ( |
| gt from typegpustd.ts | 49.03 kB ( |
| isCloseTo from typegpustd.ts | 49.03 kB ( |
| le from typegpustd.ts | 49.03 kB ( |
| select from typegpustd.ts | 49.03 kB ( |
| common from typegpu.ts | 53.43 kB ( |
| isUsableAsUniform from typegpu.ts | 60.46 kB ( |
| isTexture from typegpu.ts | 60.47 kB ( |
| isSampler from typegpu.ts | 60.48 kB ( |
| isComparisonSampler from typegpu.ts | 60.49 kB ( |
| isVariable from typegpu.ts | 62.26 kB ( |
| dot from typegpustd.ts | 63.38 kB ( |
| length from typegpustd.ts | 63.38 kB ( |
| distance from typegpustd.ts | 63.39 kB ( |
| dot4U8Packed from typegpustd.ts | 63.39 kB ( |
| fract from typegpustd.ts | 63.39 kB ( |
| frexp from typegpustd.ts | 63.39 kB ( |
| mix from typegpustd.ts | 63.39 kB ( |
| modf from typegpustd.ts | 63.39 kB ( |
| abs from typegpustd.ts | 63.39 kB ( |
| acos from typegpustd.ts | 63.39 kB ( |
| acosh from typegpustd.ts | 63.39 kB ( |
| asin from typegpustd.ts | 63.39 kB ( |
| asinh from typegpustd.ts | 63.39 kB ( |
| atan2 from typegpustd.ts | 63.39 kB ( |
| atan from typegpustd.ts | 63.39 kB ( |
| atanh from typegpustd.ts | 63.39 kB ( |
| ceil from typegpustd.ts | 63.39 kB ( |
| clamp from typegpustd.ts | 63.39 kB ( |
| cos from typegpustd.ts | 63.39 kB ( |
| cosh from typegpustd.ts | 63.39 kB ( |
| countLeadingZeros from typegpustd.ts | 63.39 kB ( |
| countOneBits from typegpustd.ts | 63.39 kB ( |
| countTrailingZeros from typegpustd.ts | 63.39 kB ( |
| cross from typegpustd.ts | 63.39 kB ( |
| degrees from typegpustd.ts | 63.39 kB ( |
| determinant from typegpustd.ts | 63.39 kB ( |
| dot4I8Packed from typegpustd.ts | 63.39 kB ( |
| exp2 from typegpustd.ts | 63.39 kB ( |
| exp from typegpustd.ts | 63.39 kB ( |
| extractBits from typegpustd.ts | 63.39 kB ( |
| faceForward from typegpustd.ts | 63.39 kB ( |
| firstLeadingBit from typegpustd.ts | 63.39 kB ( |
| firstTrailingBit from typegpustd.ts | 63.39 kB ( |
| floor from typegpustd.ts | 63.39 kB ( |
| fma from typegpustd.ts | 63.39 kB ( |
| insertBits from typegpustd.ts | 63.39 kB ( |
| inverseSqrt from typegpustd.ts | 63.39 kB ( |
| ldexp from typegpustd.ts | 63.39 kB ( |
| log2 from typegpustd.ts | 63.39 kB ( |
| log from typegpustd.ts | 63.39 kB ( |
| max from typegpustd.ts | 63.39 kB ( |
| min from typegpustd.ts | 63.39 kB ( |
| normalize from typegpustd.ts | 63.39 kB ( |
| pow from typegpustd.ts | 63.39 kB ( |
| quantizeToF16 from typegpustd.ts | 63.39 kB ( |
| radians from typegpustd.ts | 63.39 kB ( |
| reflect from typegpustd.ts | 63.39 kB ( |
| refract from typegpustd.ts | 63.39 kB ( |
| reverseBits from typegpustd.ts | 63.39 kB ( |
| round from typegpustd.ts | 63.39 kB ( |
| saturate from typegpustd.ts | 63.39 kB ( |
| sign from typegpustd.ts | 63.39 kB ( |
| sin from typegpustd.ts | 63.39 kB ( |
| sinh from typegpustd.ts | 63.39 kB ( |
| smoothstep from typegpustd.ts | 63.39 kB ( |
| sqrt from typegpustd.ts | 63.39 kB ( |
| step from typegpustd.ts | 63.39 kB ( |
| tan from typegpustd.ts | 63.39 kB ( |
| tanh from typegpustd.ts | 63.39 kB ( |
| transpose from typegpustd.ts | 63.39 kB ( |
| trunc from typegpustd.ts | 63.39 kB ( |
| d from typegpu.ts | 84.63 kB ( |
| isUsableAsVertex from typegpu.ts | 86.04 kB ( |
| isBuffer from typegpu.ts | 86.04 kB ( |
| dataImportEverything.ts | 86.94 kB ( |
| std from typegpu.ts | 99.54 kB ( |
| WgslGenerator from typegpu.ts | 102.03 kB ( |
| stdImportEverything.ts | 102.32 kB ( |
| tgpuImportEverything.ts | 252.32 kB ( |
| tgpu from typegpu.ts | 252.32 kB ( |
| tgpu.fn from typegpu.ts | 252.33 kB ( |
| tgpu.init from typegpu.ts | 252.33 kB ( |
| tgpu.lazy from typegpu.ts | 252.33 kB ( |
| tgpu.slot from typegpu.ts | 252.33 kB ( |
| tgpu.const from typegpu.ts | 252.33 kB ( |
| tgpu.unroll from typegpu.ts | 252.33 kB ( |
| tgpu.resolve from typegpu.ts | 252.33 kB ( |
| tgpu.accessor from typegpu.ts | 252.33 kB ( |
| tgpu.comptime from typegpu.ts | 252.33 kB ( |
| tgpu.vertexFn from typegpu.ts | 252.33 kB ( |
| tgpu.computeFn from typegpu.ts | 252.33 kB ( |
| tgpu.fragmentFn from typegpu.ts | 252.33 kB ( |
| tgpu.privateVar from typegpu.ts | 252.33 kB ( |
| tgpuImportOne.ts | 252.33 kB ( |
| tgpu.vertexLayout from typegpu.ts | 252.33 kB ( |
| tgpu.workgroupVar from typegpu.ts | 252.33 kB ( |
| tgpu.initFromDevice from typegpu.ts | 252.34 kB ( |
| tgpu.bindGroupLayout from typegpu.ts | 252.34 kB ( |
| tgpu.mutableAccessor from typegpu.ts | 252.34 kB ( |
| tgpu.resolveWithContext from typegpu.ts | 252.34 kB ( |
| importEntireLibrary.ts | 279.57 kB ( |
| functionWithUseGpu.ts | 282 B (➖) |
| functionWithoutUseGpu.ts | 24 B (➖) |
| MissingBindGroupsError from typegpu.ts | 1.34 kB (➖) |
| MissingLinksError from typegpu.ts | 201 B (➖) |
| MissingSlotValueError from typegpu.ts | 151 B (➖) |
| MissingVertexBuffersError from typegpu.ts | 1.35 kB (➖) |
| NotUniformError from typegpu.ts | 1.30 kB (➖) |
| ResolutionError from typegpu.ts | 1.55 kB (➖) |
| ShaderGenerator from typegpu.ts | 1.80 kB (➖) |
| Void from typegpudata.ts | 734 B (➖) |
| atomic from typegpudata.ts | 779 B (➖) |
| comparisonSampler from typegpudata.ts | 753 B (➖) |
| deepEqual from typegpudata.ts | 2.77 kB (➖) |
| isAccessor from typegpu.ts | 65 B (➖) |
| isAlignAttrib from typegpudata.ts | 755 B (➖) |
| isAtomic from typegpudata.ts | 755 B (➖) |
| isBufferShorthand from typegpu.ts | 1.81 kB (➖) |
| isBuiltinAttrib from typegpudata.ts | 757 B (➖) |
| isData from typegpudata.ts | 2.39 kB (➖) |
| isDecorated from typegpudata.ts | 758 B (➖) |
| isDisarray from typegpudata.ts | 1.69 kB (➖) |
| isInterpolateAttrib from typegpudata.ts | 761 B (➖) |
| isLazy from typegpu.ts | 61 B (➖) |
| isLocationAttrib from typegpudata.ts | 758 B (➖) |
| isLooseData from typegpudata.ts | 1.74 kB (➖) |
| isLooseDecorated from typegpudata.ts | 1.70 kB (➖) |
| isMutableAccessor from typegpu.ts | 73 B (➖) |
| isPtr from typegpudata.ts | 752 B (➖) |
| isSizeAttrib from typegpudata.ts | 754 B (➖) |
| isSlot from typegpu.ts | 61 B (➖) |
| isTgpuComputeFn from typegpu.ts | 69 B (➖) |
| isTgpuFn from typegpu.ts | 765 B (➖) |
| isTgpuFragmentFn from typegpu.ts | 70 B (➖) |
| isTgpuVertexFn from typegpu.ts | 68 B (➖) |
| isUnstruct from typegpudata.ts | 1.69 kB (➖) |
| isUsableAsRender from typegpu.ts | 55 B (➖) |
| isUsableAsSampled from typegpu.ts | 56 B (➖) |
| isUsableAsStorage from typegpu.ts | 56 B (➖) |
| isWgslArray from typegpudata.ts | 754 B (➖) |
| isWgslData from typegpudata.ts | 1.31 kB (➖) |
| isWgslStruct from typegpudata.ts | 755 B (➖) |
| ptrFn from typegpudata.ts | 859 B (➖) |
| ptrHandle from typegpudata.ts | 851 B (➖) |
| ptrPrivate from typegpudata.ts | 858 B (➖) |
| ptrStorage from typegpudata.ts | 856 B (➖) |
| ptrUniform from typegpudata.ts | 852 B (➖) |
| ptrWorkgroup from typegpudata.ts | 860 B (➖) |
| ref from typegpudata.ts | 4.18 kB (➖) |
| sampler from typegpudata.ts | 742 B (➖) |
| struct from typegpudata.ts | 3.37 kB (➖) |
| textureExternal from typegpudata.ts | 873 B (➖) |
| textureStorage1d from typegpudata.ts | 1.01 kB (➖) |
| textureStorage2dArray from typegpudata.ts | 1.03 kB (➖) |
| textureStorage2d from typegpudata.ts | 1.01 kB (➖) |
| textureStorage3d from typegpudata.ts | 1.01 kB (➖) |
| unstruct from typegpudata.ts | 1.65 kB (➖) |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.55, 1.23, 2.60, 4.44, 4.53, 7.50, 15.33, 16.22]
line [0.60, 1.14, 2.63, 4.03, 4.94, 7.79, 14.05, 16.34]
line [0.66, 1.35, 2.86, 4.30, 4.76, 7.44, 15.48, 14.91]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.24, 0.38, 0.48, 0.60, 0.77, 0.79, 0.93, 0.98]
line [0.24, 0.32, 0.43, 0.57, 0.76, 0.77, 0.93, 1.01]
line [0.25, 0.40, 0.47, 0.58, 0.79, 0.86, 1.03, 1.14]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.56, 1.53, 2.74, 4.06, 8.01, 17.06, 36.71, 73.86]
line [0.65, 1.30, 2.86, 4.06, 8.05, 17.10, 36.73, 73.38]
line [0.65, 1.45, 2.93, 4.08, 8.17, 16.74, 36.01, 75.59]
|
acef74c to
84950e2
Compare
f32 when trying to find a type common with abstractFloat and i32 (or u32)f32 when trying to find a type common with abstractFloat and i32 (or u32)
65a22ca to
894dc0a
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes TGSL common-type inference so that operations mixing abstractFloat with i32/u32 select f32 (instead of incorrectly preferring an integer type), aligning generated WGSL with expected float semantics for float literals.
Changes:
- Update implicit conversion ranking to prefer
f32as the common type for{i32|u32} <-> abstractFloatcases. - Adjust best-type selection to allow an
abstractFloatcandidate to resolve to concretef32. - Add/adjust tests covering integer–float multiplication, common-type conversion behavior, and an indentation fixture impacted by the new conversion behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/typegpu/src/tgsl/conversion.ts | Updates conversion ranking + best-type selection to resolve abstractFloat mixed with ints to f32. |
| packages/typegpu/tests/tgsl/conversion.test.ts | Adds regression coverage ensuring abstractFloat + i32 yields f32. |
| packages/typegpu/tests/tgsl/multiplication.test.ts | Adds end-to-end coverage for integer * float-literal multiplication producing f32 and warnings. |
| packages/typegpu/tests/indent.test.ts | Updates a loop condition expression to remain valid/stable under the updated conversion behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
17b7556 to
6d2959c
Compare
894dc0a to
c97e537
Compare
cieplypolar
reviewed
Apr 21, 2026
6d2959c to
c7e9ac4
Compare
bf43e7b to
39b48aa
Compare
39b48aa to
b538979
Compare
Contributor
|
See #2403 |
2dfe4f4 to
b627f01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocked by #2388