From 54e68622cc363771371ccdd8066c2a6443a73205 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Wed, 27 Nov 2024 12:26:24 -0700 Subject: [PATCH] lint problems, https://github.com/phetsims/chipper/issues/1462 --- js/render-program/RenderProgram.ts | 1 - .../RenderProgramComputeTests.ts | 39 ++++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/js/render-program/RenderProgram.ts b/js/render-program/RenderProgram.ts index 01abd68..2c9070a 100644 --- a/js/render-program/RenderProgram.ts +++ b/js/render-program/RenderProgram.ts @@ -8,7 +8,6 @@ import Matrix3 from '../../../dot/js/Matrix3.js'; import Vector4 from '../../../dot/js/Vector4.js'; -// eslint-disable-next-line phet/single-line-import import { alpenglow, ClippableFace, PolygonalFace, RenderableFace, RenderAlpha, RenderBarycentricBlend, RenderBarycentricPerspectiveBlend, RenderBlendCompose, RenderColor, RenderColorSpace, RenderColorSpaceConversion, RenderDepthSort, RenderEvaluationContext, RenderFilter, RenderImage, RenderInstruction, RenderLinearBlend, RenderLinearGradient, RenderNormalDebug, RenderNormalize, RenderPath, RenderPathBoolean, RenderPhong, RenderProgramNeeds, RenderRadialBlend, RenderRadialGradient, RenderStack, SerializedRenderAlpha, SerializedRenderBarycentricBlend, SerializedRenderBarycentricPerspectiveBlend, SerializedRenderBlendCompose, SerializedRenderColor, SerializedRenderColorSpaceConversion, SerializedRenderDepthSort, SerializedRenderFilter, SerializedRenderImage, SerializedRenderLinearBlend, SerializedRenderLinearGradient, SerializedRenderNormalDebug, SerializedRenderNormalize, SerializedRenderPathBoolean, SerializedRenderPhong, SerializedRenderRadialBlend, SerializedRenderRadialGradient, SerializedRenderStack } from '../imports.js'; // Output should be chained (the `output` parameter should be returned, for convenience) diff --git a/js/webgpu/tests/render-program/RenderProgramComputeTests.ts b/js/webgpu/tests/render-program/RenderProgramComputeTests.ts index dc4ea72..ba9dac1 100644 --- a/js/webgpu/tests/render-program/RenderProgramComputeTests.ts +++ b/js/webgpu/tests/render-program/RenderProgramComputeTests.ts @@ -10,6 +10,7 @@ import Matrix4 from '../../../../../dot/js/Matrix4.js'; import Vector2 from '../../../../../dot/js/Vector2.js'; import Vector3 from '../../../../../dot/js/Vector3.js'; import Vector4 from '../../../../../dot/js/Vector4.js'; +// eslint-disable-next-line phet/single-line-import import { asyncTestWithDevice, BufferArraySlot, BufferBindingType, BufferSlot, ByteEncoder, ConcreteType, DeviceContext, DirectModule, evaluate_render_program_instructionsWGSL, F32Type, getArrayType, LinearEdge, LinearEdgeWGSL, Procedure, RenderAlpha, RenderBarycentricBlend, RenderBarycentricBlendAccuracy, RenderBarycentricPerspectiveBlend, RenderBarycentricPerspectiveBlendAccuracy, RenderBlendCompose, RenderBlendType, RenderColor, RenderComposeType, RenderEvaluationContext, RenderExtend, RenderFilter, RenderGradientStop, RenderInstruction, RenderLight, RenderLinearBlend, RenderLinearBlendAccuracy, RenderLinearDisplayP3ToLinearSRGB, RenderLinearGradient, RenderLinearGradientAccuracy, RenderLinearSRGBToLinearDisplayP3, RenderLinearSRGBToOklab, RenderLinearSRGBToSRGB, RenderNormalDebug, RenderNormalize, RenderOklabToLinearSRGB, RenderPhong, RenderPremultiply, RenderProgram, RenderRadialBlend, RenderRadialBlendAccuracy, RenderRadialGradient, RenderRadialGradientAccuracy, RenderSRGBToLinearSRGB, RenderStack, RenderUnpremultiply, Routine, StoreStatementCallback, U32Type, wgsl, WGSLExpression, WGSLMainModule, WGSLReferenceModule, WGSLSlot, WGSLStatements } from '../../../imports.js'; @@ -161,25 +162,25 @@ const renderProgramComputeEvaluate = async ( @builtin(workgroup_id) workgroup_id: vec3u ) { let result: vec4f = ${evaluate_render_program_instructionsWGSL( - wgsl`config.render_program_index`, - wgsl`config.edgesOffset`, - wgsl`config.numEdges`, - wgsl`config.isFullArea != 0u`, - wgsl`config.needsFace != 0u`, - wgsl`config.area`, - wgsl`config.minX`, - wgsl`config.minY`, - wgsl`config.maxX`, - wgsl`config.maxY`, - wgsl`config.minXCount`, - wgsl`config.minYCount`, - wgsl`config.maxXCount`, - wgsl`config.maxYCount`, - { - getRenderProgramInstruction: index => wgsl`render_program_instructions[ ${index} ]`, - getLinearEdge: index => wgsl`${LinearEdgeWGSL}( vec2( complete_edges[ 4u * ${index} ], complete_edges[ 4 * ${index} + 1u ] ), vec2( complete_edges[ 4u * ${index} + 2u ], complete_edges[ 4u * ${index} + 3u ] ) )` - } - )}; + wgsl`config.render_program_index`, + wgsl`config.edgesOffset`, + wgsl`config.numEdges`, + wgsl`config.isFullArea != 0u`, + wgsl`config.needsFace != 0u`, + wgsl`config.area`, + wgsl`config.minX`, + wgsl`config.minY`, + wgsl`config.maxX`, + wgsl`config.maxY`, + wgsl`config.minXCount`, + wgsl`config.minYCount`, + wgsl`config.maxXCount`, + wgsl`config.maxYCount`, + { + getRenderProgramInstruction: index => wgsl`render_program_instructions[ ${index} ]`, + getLinearEdge: index => wgsl`${LinearEdgeWGSL}( vec2( complete_edges[ 4u * ${index} ], complete_edges[ 4 * ${index} + 1u ] ), vec2( complete_edges[ 4u * ${index} + 2u ], complete_edges[ 4u * ${index} + 3u ] ) )` + } + )}; // TODO: typing output[ 0u ] = result.x;