Skip to content

Commit

Permalink
remove entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jan 25, 2024
1 parent 7ab48e4 commit abe4e2e
Show file tree
Hide file tree
Showing 194 changed files with 19 additions and 508 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
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
4 changes: 0 additions & 4 deletions webgpu/lessons/webgpu-cube-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ setting up the texture coordinates.
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: (3 + 2) * 4, // (3+2) floats 4 bytes each
Expand All @@ -192,7 +191,6 @@ setting up the texture coordinates.
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
primitive: {
Expand Down Expand Up @@ -340,11 +338,9 @@ Now we need to update `generateMips` to handle multiple sources.
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: texture.format }],
},
});
Expand Down
2 changes: 0 additions & 2 deletions webgpu/lessons/webgpu-environment-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ async function showCube(canvas, uiDiv) {
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
arrayStride: (3) * 4, // (3) floats 4 bytes each
Expand All @@ -151,7 +150,6 @@ async function showCube(canvas, uiDiv) {
},
fragment: {
module,
entryPoint: 'fs',
targets: [{ format: presentationFormat }],
},
primitive: {
Expand Down
1 change: 0 additions & 1 deletion webgpu/lessons/webgpu-environment-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ And of course we need to change our pipeline to provide the normals
layout: 'auto',
vertex: {
module,
entryPoint: 'vs',
buffers: [
{
- arrayStride: (3) * 4, // (3) floats 4 bytes each
Expand Down
Loading

0 comments on commit abe4e2e

Please sign in to comment.