Skip to content

Commit

Permalink
lint problems, phetsims/chipper#1462
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 27, 2024
1 parent a318c3b commit 54e6862
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
1 change: 0 additions & 1 deletion js/render-program/RenderProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
39 changes: 20 additions & 19 deletions js/webgpu/tests/render-program/RenderProgramComputeTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 54e6862

Please sign in to comment.