Skip to content

Commit

Permalink
Remove entryPoint if not required (#334)
Browse files Browse the repository at this point in the history
* Remove entryPoint if not required
  • Loading branch information
beaufortfrancois authored Mar 8, 2024
1 parent b9b24a4 commit 92bb1a3
Show file tree
Hide file tree
Showing 33 changed files with 1 addition and 86 deletions.
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 sample/a-buffer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const opaquePipeline = device.createRenderPipeline({
layout: 'auto',
vertex: {
module: opaqueModule,
entryPoint: 'main_vs',
buffers: [
{
arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,
Expand All @@ -102,7 +101,6 @@ const opaquePipeline = device.createRenderPipeline({
},
fragment: {
module: opaqueModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -205,7 +203,6 @@ const translucentPipeline = device.createRenderPipeline({
}),
vertex: {
module: translucentModule,
entryPoint: 'main_vs',
buffers: [
{
arrayStride: 3 * Float32Array.BYTES_PER_ELEMENT,
Expand All @@ -221,7 +218,6 @@ const translucentPipeline = device.createRenderPipeline({
},
fragment: {
module: translucentModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -293,11 +289,9 @@ const compositePipeline = device.createRenderPipeline({
}),
vertex: {
module: compositeModule,
entryPoint: 'main_vs',
},
fragment: {
module: compositeModule,
entryPoint: 'main_fs',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions sample/animometer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ const pipelineDesc: GPURenderPipelineDescriptor = {
layout: 'auto',
vertex: {
module: shaderModule,
entryPoint: 'vert_main',
buffers: [
{
// vertex buffer
Expand All @@ -121,7 +120,6 @@ const pipelineDesc: GPURenderPipelineDescriptor = {
},
fragment: {
module: shaderModule,
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand Down
4 changes: 0 additions & 4 deletions sample/bitonicSort/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ SampleInitFactoryWebGPU(
module: device.createShaderModule({
code: NaiveBitonicCompute(settings['Workgroup Size']),
}),
entryPoint: 'computeMain',
},
});

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

Expand Down Expand Up @@ -427,7 +425,6 @@ SampleInitFactoryWebGPU(
Math.min(settings['Total Elements'] / 2, settings['Size Limit'])
),
}),
entryPoint: 'computeMain',
},
});
// Randomize array elements
Expand Down Expand Up @@ -544,7 +541,6 @@ SampleInitFactoryWebGPU(
Math.min(settings['Total Elements'] / 2, settings['Size Limit'])
),
}),
entryPoint: 'computeMain',
},
});
// Create new config key for current element + size limit configuration
Expand Down
2 changes: 0 additions & 2 deletions sample/bitonicSort/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,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 sample/cameras/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: cubeWGSL,
}),
entryPoint: 'vertex_main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -94,7 +93,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: cubeWGSL,
}),
entryPoint: 'fragment_main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions sample/computeBoids/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const renderPipeline = device.createRenderPipeline({
layout: 'auto',
vertex: {
module: spriteShaderModule,
entryPoint: 'vert_main',
buffers: [
{
// instanced particles buffer
Expand Down Expand Up @@ -82,7 +81,6 @@ const renderPipeline = device.createRenderPipeline({
},
fragment: {
module: spriteShaderModule,
entryPoint: 'frag_main',
targets: [
{
format: presentationFormat,
Expand All @@ -100,7 +98,6 @@ const computePipeline = device.createComputePipeline({
module: device.createShaderModule({
code: updateSpritesWGSL,
}),
entryPoint: 'main',
},
});

Expand Down
2 changes: 0 additions & 2 deletions sample/cornell/rasterizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,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 sample/cornell/raytracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,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 sample/cornell/tonemapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 sample/cubemap/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: basicVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -68,7 +67,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: sampleCubemapWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
7 changes: 0 additions & 7 deletions sample/deferredRendering/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,12 @@ const writeGBuffersPipeline = device.createRenderPipeline({
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 @@ -206,13 +204,11 @@ const gBuffersDebugViewPipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: vertexTextureQuad,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: fragmentGBuffersDebugView,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand All @@ -237,13 +233,11 @@ const deferredRenderPipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: vertexTextureQuad,
}),
entryPoint: 'main',
},
fragment: {
module: device.createShaderModule({
code: fragmentDeferredRendering,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down Expand Up @@ -423,7 +417,6 @@ const lightUpdateComputePipeline = device.createComputePipeline({
module: device.createShaderModule({
code: lightUpdate,
}),
entryPoint: 'main',
},
});
const lightsBufferBindGroup = device.createBindGroup({
Expand Down
2 changes: 0 additions & 2 deletions sample/fractalCube/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: basicVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -72,7 +71,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: sampleSelfWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
3 changes: 0 additions & 3 deletions sample/gameOfLife/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function resetGameData() {
}),
compute: {
module: computeShader,
entryPoint: 'main',
constants: {
blockSize: GameOptions.workgroupSize,
},
Expand Down Expand Up @@ -191,12 +190,10 @@ function resetGameData() {
},
vertex: {
module: vertexShader,
entryPoint: 'main',
buffers: [cellsStride, squareStride],
},
fragment: {
module: fragmentShader,
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions sample/helloTriangle/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ const pipeline = device.createRenderPipeline({
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 sample/helloTriangleMSAA/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ const pipeline = device.createRenderPipeline({
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 sample/imageBlur/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const blurPipeline = device.createComputePipeline({
module: device.createShaderModule({
code: blurWGSL,
}),
entryPoint: 'main',
},
});

Expand All @@ -39,13 +38,11 @@ const fullscreenQuadPipeline = device.createRenderPipeline({
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 sample/instancedCube/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: instancedVertWGSL,
}),
entryPoint: 'main',
buffers: [
{
arrayStride: cubeVertexSize,
Expand All @@ -68,7 +67,6 @@ const pipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: vertexPositionColorWGSL,
}),
entryPoint: 'main',
targets: [
{
format: presentationFormat,
Expand Down
2 changes: 0 additions & 2 deletions 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
2 changes: 0 additions & 2 deletions sample/particles/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const renderPipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: particleWGSL,
}),
entryPoint: 'vs_main',
buffers: [
{
// instanced particles buffer
Expand Down Expand Up @@ -83,7 +82,6 @@ const renderPipeline = device.createRenderPipeline({
module: device.createShaderModule({
code: particleWGSL,
}),
entryPoint: 'fs_main',
targets: [
{
format: presentationFormat,
Expand Down
Loading

0 comments on commit 92bb1a3

Please sign in to comment.