Skip to content

Commit

Permalink
Remove entryPoint if not required
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Mar 6, 2024
1 parent bcba0c6 commit a28b6fd
Show file tree
Hide file tree
Showing 32 changed files with 6 additions and 85 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@types/stats.js": "^0.17.0",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"@webgpu/types": "^0.1.38",
"@webgpu/types": "^0.1.40",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
Expand Down
2 changes: 0 additions & 2 deletions public/workload-simulator.html
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,9 @@ <h2><center>Web graphics workload simulator</center></h2>
layout: pipelineLayout,
multisample: { count: sampleCount },
vertex: {
entryPoint: 'vs',
module: shaderModule,
},
fragment: {
entryPoint: 'fs',
targets: [ { format: canvasFormat, }, ],
module: shaderModule,
},
Expand Down
6 changes: 0 additions & 6 deletions src/sample/a-buffer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
layout: 'auto',
vertex: {
module: opaqueModule,
entryPoint: 'main_vs',
buffers: [
{
arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,
Expand All @@ -104,7 +103,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
},
fragment: {
module: opaqueModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -207,7 +205,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
}),
vertex: {
module: translucentModule,
entryPoint: 'main_vs',
buffers: [
{
arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,
Expand All @@ -223,7 +220,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
},
fragment: {
module: translucentModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -295,11 +291,9 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
}),
vertex: {
module: compositeModule,
entryPoint: 'main_vs',
},
fragment: {
module: compositeModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/animometer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
layout: 'auto',
vertex: {
module: shaderModule,
entryPoint: 'vert_main',
buffers: [
{
// vertex buffer
Expand All @@ -125,7 +124,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
},
fragment: {
module: shaderModule,
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions src/sample/bitonicSort/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ SampleInitFactoryWebGPU(
module: device.createShaderModule({
code: NaiveBitonicCompute(settings['Workgroup Size']),
}),
entryPoint: 'computeMain',
},
});

Expand All @@ -310,7 +309,6 @@ SampleInitFactoryWebGPU(
module: device.createShaderModule({
code: atomicToZero,
}),
entryPoint: 'atomicToZero',
},
});

Expand Down Expand Up @@ -430,7 +428,6 @@ SampleInitFactoryWebGPU(
Math.min(settings['Total Elements'] / 2, settings['Size Limit'])
),
}),
entryPoint: 'computeMain',
},
});
// Randomize array elements
Expand Down
2 changes: 0 additions & 2 deletions src/sample/bitonicSort/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,11 @@ export abstract class Base2DRendererClass {
module: device.createShaderModule({
code: fullscreenTexturedQuad,
}),
entryPoint: 'vert_main',
},
fragment: {
module: device.createShaderModule({
code: code,
}),
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/cameras/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: cubeWGSL,
}),
entryPoint: 'vertex_main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -95,7 +94,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: cubeWGSL,
}),
entryPoint: 'fragment_main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions src/sample/computeBoids/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
layout: 'auto',
vertex: {
module: spriteShaderModule,
entryPoint: 'vert_main',
buffers: [
{
// instanced particles buffer
Expand Down Expand Up @@ -85,7 +84,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
},
fragment: {
module: spriteShaderModule,
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand All @@ -103,7 +101,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: updateSpritesWGSL,
}),
entryPoint: 'main',
},
});

Expand Down
2 changes: 0 additions & 2 deletions src/sample/cornell/rasterizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,10 @@ export default class Rasterizer {
}),
vertex: {
module: mod,
entryPoint: 'vs_main',
buffers: scene.vertexBufferLayout,
},
fragment: {
module: mod,
entryPoint: 'fs_main',
targets: [{ format: framebuffer.format }],
},
primitive: {
Expand Down
1 change: 0 additions & 1 deletion src/sample/cornell/raytracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export default class Raytracer {
module: device.createShaderModule({
code: raytracerWGSL + common.wgsl,
}),
entryPoint: 'main',
constants: {
WorkgroupSizeX: this.kWorkgroupSizeX,
WorkgroupSizeY: this.kWorkgroupSizeY,
Expand Down
1 change: 0 additions & 1 deletion src/sample/cornell/tonemapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export default class Tonemapper {
layout: pipelineLayout,
compute: {
module: mod,
entryPoint: 'main',
constants: {
WorkgroupSizeX: this.kWorkgroupSizeX,
WorkgroupSizeY: this.kWorkgroupSizeY,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/cubemap/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: basicVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -70,7 +69,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: sampleCubemapWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
7 changes: 0 additions & 7 deletions src/sample/deferredRendering/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,12 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: vertexWriteGBuffers,
}),
entryPoint: 'main',
buffers: vertexBuffers,
},
fragment: {
module: device.createShaderModule({
code: fragmentWriteGBuffers,
}),
entryPoint: 'main',
targets: [
// normal
{ format: 'rgba16float' },
Expand Down Expand Up @@ -208,13 +206,11 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: vertexTextureQuad,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: fragmentGBuffersDebugView,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand All @@ -239,13 +235,11 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: vertexTextureQuad,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: fragmentDeferredRendering,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -424,7 +418,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: lightUpdate,
}),
entryPoint: 'main',
},
});
const lightsBufferBindGroup = device.createBindGroup({
Expand Down
2 changes: 0 additions & 2 deletions src/sample/fractalCube/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: basicVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -74,7 +73,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: sampleSelfWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions src/sample/gameOfLife/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
}),
compute: {
module: computeShader,
entryPoint: 'main',
constants: {
blockSize: GameOptions.workgroupSize,
},
Expand Down Expand Up @@ -190,12 +189,10 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
},
vertex: {
module: vertexShader,
entryPoint: 'main',
buffers: [cellsStride, squareStride],
},
fragment: {
module: fragmentShader,
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/helloTriangle/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: triangleVertWGSL,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: redFragWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/helloTriangleMSAA/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: triangleVertWGSL,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: redFragWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions src/sample/imageBlur/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: blurWGSL,
}),
entryPoint: 'main',
},
});

Expand All @@ -41,13 +40,11 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
module: device.createShaderModule({
code: fullscreenTexturedQuadWGSL,
}),
entryPoint: 'vert_main',
},
fragment: {
module: device.createShaderModule({
code: fullscreenTexturedQuadWGSL,
}),
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/instancedCube/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: instancedVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -70,7 +69,6 @@ const init: SampleInit = async ({ canvas, pageState }) => {
module: device.createShaderModule({
code: vertexPositionColorWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions src/sample/normalMap/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ export const create3DRenderPipeline = (
label: `${label}.vertexShader`,
code: vertexShader,
}),
entryPoint: 'vertexMain',
buffers:
vBufferFormats.length !== 0 ? [createVBuffer(vBufferFormats)] : [],
},
Expand All @@ -164,7 +163,6 @@ export const create3DRenderPipeline = (
label: `${label}.fragmentShader`,
code: fragmentShader,
}),
entryPoint: 'fragmentMain',
targets: [
{
format: presentationFormat,
Expand Down
Loading

0 comments on commit a28b6fd

Please sign in to comment.