Skip to content

Commit

Permalink
remove entryPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed May 2, 2024
1 parent a4471c0 commit 06b000a
Show file tree
Hide file tree
Showing 198 changed files with 26 additions and 505 deletions.
2 changes: 0 additions & 2 deletions webgpu/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
layout: 'auto',
vertex: {
module: shaderModule,
entryPoint: 'myVSMain',
buffers: [
{
arrayStride: (3 + 3 + 4) * 4, // 5 floats, 4 bytes each
Expand All @@ -197,7 +196,6 @@
},
fragment: {
module: shaderModule,
entryPoint: 'myFSMain',
targets: [
{format: presentationFormat},
],
Expand Down
3 changes: 0 additions & 3 deletions webgpu/lessons/ja/webgpu-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,9 @@ WebGPUで生成するオブジェクトは、ほぼすべてについて`label`
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -626,7 +624,6 @@ function dispatchWorkgroup(workgroup_id) {
layout: 'auto',
compute: {
module,
entryPoint: 'computeSomething',
},
});
```
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/ja/webgpu-inter-stage-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,10 @@ inter-stage変数の本質は、ロケーション、`@location(?)`の部分で
vertex: {
- module,
+ module: vsModule,
entryPoint: 'vs',
},
fragment: {
- module,
+ module: fsModule,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/ko/webgpu-constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ override blue = 0.0;
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
+ constants: {
+ red: 1,
Expand Down
4 changes: 0 additions & 4 deletions webgpu/lessons/ko/webgpu-cube-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ struct VSOutput {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: (3 + 2) * 4, // (3+2) floats 4 bytes each
Expand All @@ -183,7 +182,6 @@ struct VSOutput {
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
primitive: {
Expand Down Expand Up @@ -327,11 +325,9 @@ struct VSOutput {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: texture.format }],
},
});
Expand Down
3 changes: 0 additions & 3 deletions webgpu/lessons/ko/webgpu-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,9 @@ GPU가 삼각형을 래스터화(rasterize)할 때(즉, 픽셀로 그릴 때),
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -613,7 +611,6 @@ function dispatchWorkgroup(workgroup_id) {
layout: 'auto',
compute: {
module,
entryPoint: 'computeSomething',
},
});
```
Expand Down
6 changes: 0 additions & 6 deletions webgpu/lessons/ko/webgpu-importing-textures.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,9 @@ WebGPU에서 우리는 노멀 맵이나 높이(height) 맵등 색상이 아닌
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: texture.format }],
},
});
Expand Down Expand Up @@ -314,11 +312,9 @@ WebGPU에서 우리는 노멀 맵이나 높이(height) 맵등 색상이 아닌
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
+ targets: [{ format: texture.format }],
},
});
Expand Down Expand Up @@ -1016,7 +1012,6 @@ struct VSOutput {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: (4) * 4, // (3) floats 4 bytes each + one 4 byte color
Expand All @@ -1031,7 +1026,6 @@ struct VSOutput {
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
primitive: {
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/ko/webgpu-inter-stage-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,10 @@ select = (a, b, condition) => condition ? b : a;
vertex: {
- module,
+ module: vsModule,
entryPoint: 'vs',
},
fragment: {
- module,
+ module: fsModule,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
8 changes: 0 additions & 8 deletions webgpu/lessons/ko/webgpu-vertex-buffers.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct VSOutput {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
+ buffers: [
+ {
+ arrayStride: 2 * 4, // 2개 부동소수점 각각 4바이트
Expand All @@ -83,7 +82,6 @@ struct VSOutput {
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -265,7 +263,6 @@ struct VSOutput {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
arrayStride: 2 * 4, // 2 floats, 4 bytes each
Expand All @@ -292,7 +289,6 @@ struct VSOutput {
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -431,7 +427,6 @@ perVertexColor 데이터를 아래와 같이 엮을 것입니다.
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: 2 * 4, // 2 floats, 4 bytes each
Expand Down Expand Up @@ -460,7 +455,6 @@ perVertexColor 데이터를 아래와 같이 엮을 것입니다.
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -735,7 +729,6 @@ function createCircleVertices({
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: 5 * 4, // 5 floats, 4 bytes each
Expand Down Expand Up @@ -768,7 +761,6 @@ function createCircleVertices({
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/resources/generate-mips-gpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ export const generateMips = (() => {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: texture.format }],
},
});
Expand Down
3 changes: 0 additions & 3 deletions webgpu/lessons/ru/webgpu-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,9 @@ JavaScript'те `Array.map(function(value, index) { ... })`. Если мы го
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -551,7 +549,6 @@ function dispatchWorkgroup(workgroup_id) {
layout: 'auto',
compute: {
module,
entryPoint: 'computeSomething',
},
});
```
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/ru/webgpu-inter-stage-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,10 @@ select = (a, b, condition) => condition ? b : a;
vertex: {
- module,
+ module: vsModule,
entryPoint: 'vs',
},
fragment: {
- module,
+ module: fsModule,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
3 changes: 0 additions & 3 deletions webgpu/lessons/uk/webgpu-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,9 @@ main();
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down Expand Up @@ -707,7 +705,6 @@ function dispatchWorkgroup(workgroup_id) {
layout: 'auto',
compute: {
module,
entryPoint: 'computeSomething',
},
});
```
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/uk/webgpu-inter-stage-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,10 @@ select = (a, b, condition) => condition ? b : a;
vertex: {
- module,
+ module: vsModule,
entryPoint: 'vs',
},
fragment: {
- module,
+ module: fsModule,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/webgpu-cameras.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ Finally let's set the `cullMode` to cull *back facing* triangles.
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
arrayStride: (4) * 4, // (3) floats 4 bytes each + one 4 byte color
Expand All @@ -213,7 +212,6 @@ Finally let's set the `cullMode` to cull *back facing* triangles.
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
primitive: {
Expand Down
3 changes: 0 additions & 3 deletions webgpu/lessons/webgpu-compute-shaders-histogram-part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ and create pipelines for each one.
layout: 'auto',
compute: {
module: scaleModule,
entryPoint: 'cs',
},
});

Expand All @@ -574,11 +573,9 @@ and create pipelines for each one.
layout: 'auto',
vertex: {
module: drawHistogramModule,
entryPoint: 'vs',
},
fragment: {
module: drawHistogramModule,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
});
Expand Down
10 changes: 3 additions & 7 deletions webgpu/lessons/webgpu-compute-shaders-histogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ We create a compute pipeline to run the shader
layout: 'auto',
compute: {
module,
entryPoint: 'cs',
},
});
```
Expand Down Expand Up @@ -1086,26 +1085,23 @@ We need to create pipelines for both shaders
- layout: 'auto',
- compute: {
- module,
- entryPoint: 'cs',
- },
-- },
- });

+ const histogramChunkPipeline = device.createComputePipeline({
+ label: 'histogram',
+ layout: 'auto',
+ compute: {
+ module: histogramChunkModule,
+ entryPoint: 'cs',
+ },
++ },
+ });
+
+ const chunkSumPipeline = device.createComputePipeline({
+ label: 'chunk sum',
+ layout: 'auto',
+ compute: {
+ module: chunkSumModule,
+ entryPoint: 'cs',
+ },
++ },
+ });
```
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/webgpu-constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ But, we can change those constants, or "override" them when we specify the pipel
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
+ constants: {
+ red: 1,
Expand Down
Loading

0 comments on commit 06b000a

Please sign in to comment.