@forgeax/engine-render-graph 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/__tests__/texture-dimensions-lifecycle.unit.test.d.ts +2 -0
- package/dist/__tests__/texture-dimensions-lifecycle.unit.test.d.ts.map +1 -0
- package/dist/__tests__/texture-dimensions.unit.test.d.ts +2 -0
- package/dist/__tests__/texture-dimensions.unit.test.d.ts.map +1 -0
- package/dist/builder.d.ts.map +1 -1
- package/dist/index.mjs +199 -119
- package/dist/index.mjs.map +1 -1
- package/dist/resource-registry.d.ts +2 -0
- package/dist/resource-registry.d.ts.map +1 -1
- package/dist/types.d.ts +16 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/texture-dimensions-lifecycle.unit.test.ts +95 -0
- package/src/__tests__/texture-dimensions.unit.test.ts +99 -0
- package/src/builder.ts +153 -24
- package/src/resource-registry.ts +10 -0
- package/src/types.ts +14 -0
|
@@ -2,6 +2,8 @@ import type { TextureFormat } from '@forgeax/engine-rhi';
|
|
|
2
2
|
import { type CapMissingDetail, type DanglingReadDetail, type DuplicateResourceDetail, RenderGraphError, type Result } from './errors.js';
|
|
3
3
|
import type { ColorTargetDescriptor, ColorTargetSize, ResourceDescriptor, ResourceLifetime } from './graph.js';
|
|
4
4
|
import type { ColorValueDomain } from './pipeline/color-value-domain.js';
|
|
5
|
+
/** Check the only allocation/view dimension combinations supported by WebGPU. */
|
|
6
|
+
export declare function isTextureViewDimensionCompatible(allocationDimension: GPUTextureDimension, viewDimension: GPUTextureViewDimension | undefined): boolean;
|
|
5
7
|
/**
|
|
6
8
|
* Per-resource GPU allocation metadata carried through compile.
|
|
7
9
|
* When the resource was registered via addColorTarget, colorTarget
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-registry.d.ts","sourceRoot":"","sources":["../src/resource-registry.ts"],"names":[],"mapp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,SAAS;IAIpE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB,OAAO,IAAI,gBAAgB,CAAC,aAAa,CAAC;CAG3C;AAGD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export interface ImportedBufferDescriptor extends GraphBufferDescriptor {
|
|
|
56
56
|
readonly usage: number;
|
|
57
57
|
}
|
|
58
58
|
export type GraphBufferAccess = 'uniform-read' | 'storage-read' | 'storage-write' | 'storage-read-write' | 'indirect-read' | 'vertex-read' | 'index-read' | 'copy-src' | 'copy-dst';
|
|
59
|
-
export type GraphTextureAccess = 'sampled-read' | 'storage-read' | 'storage-write' | 'storage-read-write' | 'color-attachment' | 'depth-stencil-read' | 'depth-stencil-write' | 'copy-src' | 'copy-dst';
|
|
59
|
+
export type GraphTextureAccess = 'sampled-read' | 'storage-read' | 'storage-write' | 'storage-read-write' | 'sampled-storage-read-write' | 'color-attachment' | 'depth-stencil-read' | 'depth-stencil-write' | 'copy-src' | 'copy-dst';
|
|
60
60
|
export type GraphAccess = {
|
|
61
61
|
readonly resource: GraphBuffer;
|
|
62
62
|
readonly usage: GraphBufferAccess;
|
|
@@ -167,7 +167,22 @@ export interface CompiledRenderGraphInfo {
|
|
|
167
167
|
readonly firstUse: number | null;
|
|
168
168
|
readonly lastUse: number | null;
|
|
169
169
|
readonly derivedUsage: number;
|
|
170
|
+
/** Stable compile-local identity of the physical RHI allocation. */
|
|
171
|
+
readonly physicalAllocationKey?: string | undefined;
|
|
172
|
+
/** Descriptor-derived byte size when the format is uncompressed and known. */
|
|
173
|
+
readonly byteSize?: number | undefined;
|
|
174
|
+
/** Texture format retained for producer-owned resource inspection. */
|
|
175
|
+
readonly format?: TextureFormat | undefined;
|
|
176
|
+
/** Texture allocation facts retained for capability/lifetime inspection. */
|
|
177
|
+
readonly dimension?: GPUTextureDimension | undefined;
|
|
178
|
+
readonly extent?: {
|
|
179
|
+
readonly width: number;
|
|
180
|
+
readonly height: number;
|
|
181
|
+
readonly depthOrArrayLayers: number;
|
|
182
|
+
} | undefined;
|
|
170
183
|
}[];
|
|
184
|
+
/** Monotonic graph generation assigned when this graph was compiled. */
|
|
185
|
+
readonly generation: number;
|
|
171
186
|
}
|
|
172
187
|
export interface RenderGraphFrame {
|
|
173
188
|
readonly encoder: RhiCommandEncoder;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EACpB,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,CAAC,MAAM,iBAAiB,EAAE,OAAO,MAAM,CAAC;AAC/C,OAAO,CAAC,MAAM,qBAAqB,EAAE,OAAO,MAAM,CAAC;AACnD,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,MAAM,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC;CACnC;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,gBAAgB,GAAG,WAAW,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU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Q,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAEjG,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3E;AAED,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,gBAAgB;IACpE,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAC1F,OAAO,IAAI,uBAAuB,CAAC;IACnC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;CACnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeax/engine-render-graph",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"LICENSE"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@forgeax/engine-rhi": "0.1.
|
|
26
|
-
"@forgeax/engine-types": "0.1.
|
|
25
|
+
"@forgeax/engine-rhi": "0.1.20",
|
|
26
|
+
"@forgeax/engine-types": "0.1.20",
|
|
27
27
|
"@webgpu/types": "^0.1.71"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@forgeax/engine-rhi-null": "0.1.
|
|
30
|
+
"@forgeax/engine-rhi-null": "0.1.20"
|
|
31
31
|
},
|
|
32
32
|
"forgeax": {
|
|
33
33
|
"metrics": {
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { RhiDevice, TextureView } from '@forgeax/engine-rhi';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { RenderGraphBuilder } from '../builder.js';
|
|
4
|
+
import type { RenderGraphFrame } from '../types.js';
|
|
5
|
+
|
|
6
|
+
interface Frame extends RenderGraphFrame {}
|
|
7
|
+
|
|
8
|
+
function caps(storageTexture: boolean): RhiDevice['caps'] {
|
|
9
|
+
return {
|
|
10
|
+
backendKind: 'null',
|
|
11
|
+
compute: true,
|
|
12
|
+
storageBuffer: true,
|
|
13
|
+
storageTexture,
|
|
14
|
+
timestampQuery: false,
|
|
15
|
+
timestampPeriodNanoseconds: null,
|
|
16
|
+
indirectDrawing: false,
|
|
17
|
+
textureCompressionBc: false,
|
|
18
|
+
textureCompressionEtc2: false,
|
|
19
|
+
textureCompressionAstc: false,
|
|
20
|
+
multiDrawIndirect: false,
|
|
21
|
+
pushConstants: false,
|
|
22
|
+
textureBindingArray: false,
|
|
23
|
+
samplerAliasing: true,
|
|
24
|
+
firstInstanceIndirect: false,
|
|
25
|
+
rgba16floatRenderable: true,
|
|
26
|
+
rg11b10ufloatRenderable: true,
|
|
27
|
+
float32Filterable: true,
|
|
28
|
+
maxColorAttachments: 8,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function mockDevice(storageTexture: boolean): RhiDevice {
|
|
33
|
+
return {
|
|
34
|
+
caps: caps(storageTexture),
|
|
35
|
+
limits: {} as never,
|
|
36
|
+
features: new Set() as never,
|
|
37
|
+
queue: { onSubmittedWorkDone: async () => undefined } as never,
|
|
38
|
+
createTexture: () => ({ ok: true, value: {} as never }),
|
|
39
|
+
createTextureView: () => ({ ok: true, value: {} as TextureView }),
|
|
40
|
+
destroyTexture: () => ({ ok: true, value: undefined }),
|
|
41
|
+
destroyBuffer: () => ({ ok: true, value: undefined }),
|
|
42
|
+
} as unknown as RhiDevice;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
describe('RenderGraph texture dimension lifecycle', () => {
|
|
46
|
+
it('returns a structured capability result for unsupported storage texture access', () => {
|
|
47
|
+
const graph = new RenderGraphBuilder<Frame>();
|
|
48
|
+
const texture = graph.createTexture('volume-storage', {
|
|
49
|
+
format: 'rgba8unorm',
|
|
50
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 2 },
|
|
51
|
+
dimension: '3d',
|
|
52
|
+
});
|
|
53
|
+
expect(texture.ok).toBe(true);
|
|
54
|
+
if (!texture.ok) return;
|
|
55
|
+
const view = graph.view(texture.value, { dimension: '3d' });
|
|
56
|
+
expect(view.ok).toBe(true);
|
|
57
|
+
if (!view.ok) return;
|
|
58
|
+
graph.addCopyPass('seed', {
|
|
59
|
+
accesses: [{ resource: view.value, usage: 'copy-dst' }],
|
|
60
|
+
encode: () => undefined,
|
|
61
|
+
});
|
|
62
|
+
graph.addComputePass('write-volume', {
|
|
63
|
+
accesses: [{ resource: view.value, usage: 'storage-write' }],
|
|
64
|
+
encode: () => undefined,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const result = graph.compile({
|
|
68
|
+
device: mockDevice(false),
|
|
69
|
+
surfaceSize: { width: 1, height: 1 },
|
|
70
|
+
});
|
|
71
|
+
expect(result.ok).toBe(false);
|
|
72
|
+
if (result.ok) return;
|
|
73
|
+
expect(result.error.code).toBe('capability-missing');
|
|
74
|
+
expect(result.error.detail).toMatchObject({ capability: 'storage-texture' });
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('rejects a non-positive volume extent with structured descriptor detail', () => {
|
|
78
|
+
const graph = new RenderGraphBuilder<Frame>();
|
|
79
|
+
const texture = graph.createTexture('invalid-volume', {
|
|
80
|
+
format: 'rgba8unorm',
|
|
81
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 0 },
|
|
82
|
+
dimension: '3d',
|
|
83
|
+
});
|
|
84
|
+
expect(texture.ok).toBe(true);
|
|
85
|
+
if (!texture.ok) return;
|
|
86
|
+
const result = graph.compile({
|
|
87
|
+
device: mockDevice(true),
|
|
88
|
+
surfaceSize: { width: 1, height: 1 },
|
|
89
|
+
});
|
|
90
|
+
expect(result.ok).toBe(false);
|
|
91
|
+
if (result.ok) return;
|
|
92
|
+
expect(result.error.code).toBe('resource-descriptor-invalid');
|
|
93
|
+
expect(result.error.detail).toMatchObject({ resourceLabel: 'invalid-volume', field: 'size' });
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ok, type RhiDevice, type Texture, type TextureView } from '@forgeax/engine-rhi';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { RenderGraphBuilder } from '../builder.js';
|
|
4
|
+
import type { RenderGraphFrame } from '../types.js';
|
|
5
|
+
|
|
6
|
+
interface Frame extends RenderGraphFrame {}
|
|
7
|
+
|
|
8
|
+
function device(overrides: Partial<RhiDevice> = {}): RhiDevice {
|
|
9
|
+
return {
|
|
10
|
+
caps: {
|
|
11
|
+
backendKind: 'null',
|
|
12
|
+
compute: true,
|
|
13
|
+
storageBuffer: true,
|
|
14
|
+
storageTexture: true,
|
|
15
|
+
timestampQuery: false,
|
|
16
|
+
timestampPeriodNanoseconds: null,
|
|
17
|
+
indirectDrawing: true,
|
|
18
|
+
textureCompressionBc: false,
|
|
19
|
+
textureCompressionEtc2: false,
|
|
20
|
+
textureCompressionAstc: false,
|
|
21
|
+
multiDrawIndirect: false,
|
|
22
|
+
pushConstants: false,
|
|
23
|
+
textureBindingArray: false,
|
|
24
|
+
samplerAliasing: true,
|
|
25
|
+
firstInstanceIndirect: false,
|
|
26
|
+
rgba16floatRenderable: true,
|
|
27
|
+
rg11b10ufloatRenderable: true,
|
|
28
|
+
float32Filterable: true,
|
|
29
|
+
maxColorAttachments: 8,
|
|
30
|
+
},
|
|
31
|
+
limits: {} as never,
|
|
32
|
+
features: new Set() as never,
|
|
33
|
+
queue: { onSubmittedWorkDone: async () => undefined } as never,
|
|
34
|
+
createTexture: () => ok({} as Texture),
|
|
35
|
+
createTextureView: () => ok({} as TextureView),
|
|
36
|
+
destroyTexture: () => ok(undefined),
|
|
37
|
+
destroyBuffer: () => ok(undefined),
|
|
38
|
+
...overrides,
|
|
39
|
+
} as unknown as RhiDevice;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
describe('RenderGraph texture dimension contract', () => {
|
|
43
|
+
it('keeps 2d-array and 3d allocation dimensions through graph-owned resources', () => {
|
|
44
|
+
const created: unknown[] = [];
|
|
45
|
+
const views: unknown[] = [];
|
|
46
|
+
const graph = new RenderGraphBuilder<Frame>();
|
|
47
|
+
const arrayTexture = graph.createTexture('layers', {
|
|
48
|
+
format: 'rgba8unorm',
|
|
49
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 3 },
|
|
50
|
+
dimension: '2d',
|
|
51
|
+
});
|
|
52
|
+
const volumeTexture = graph.createTexture('volume', {
|
|
53
|
+
format: 'rgba8unorm',
|
|
54
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 3 },
|
|
55
|
+
dimension: '3d',
|
|
56
|
+
});
|
|
57
|
+
expect(arrayTexture.ok && volumeTexture.ok).toBe(true);
|
|
58
|
+
if (!arrayTexture.ok || !volumeTexture.ok) return;
|
|
59
|
+
const arrayView = graph.view(arrayTexture.value, { dimension: '2d-array' });
|
|
60
|
+
const volumeView = graph.view(volumeTexture.value, { dimension: '3d' });
|
|
61
|
+
expect(arrayView.ok && volumeView.ok).toBe(true);
|
|
62
|
+
if (!arrayView.ok || !volumeView.ok) return;
|
|
63
|
+
graph.addCopyPass('seed-array', {
|
|
64
|
+
accesses: [{ resource: arrayView.value, usage: 'copy-dst' }],
|
|
65
|
+
encode: () => undefined,
|
|
66
|
+
});
|
|
67
|
+
graph.addCopyPass('seed-volume', {
|
|
68
|
+
accesses: [{ resource: volumeView.value, usage: 'copy-dst' }],
|
|
69
|
+
encode: () => undefined,
|
|
70
|
+
});
|
|
71
|
+
const compiled = graph.compile({
|
|
72
|
+
device: device({
|
|
73
|
+
createTexture: (descriptor: unknown) => {
|
|
74
|
+
created.push(descriptor);
|
|
75
|
+
return ok({} as Texture);
|
|
76
|
+
},
|
|
77
|
+
createTextureView: (_texture: Texture, descriptor: unknown) => {
|
|
78
|
+
views.push(descriptor);
|
|
79
|
+
return ok({} as TextureView);
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
surfaceSize: { width: 1, height: 1 },
|
|
83
|
+
});
|
|
84
|
+
expect(compiled.ok).toBe(true);
|
|
85
|
+
expect(created).toEqual(
|
|
86
|
+
expect.arrayContaining([
|
|
87
|
+
expect.objectContaining({
|
|
88
|
+
dimension: '2d',
|
|
89
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 3 },
|
|
90
|
+
}),
|
|
91
|
+
expect.objectContaining({
|
|
92
|
+
dimension: '3d',
|
|
93
|
+
size: { width: 2, height: 2, depthOrArrayLayers: 3 },
|
|
94
|
+
}),
|
|
95
|
+
]),
|
|
96
|
+
);
|
|
97
|
+
expect(views).toEqual(expect.arrayContaining([{ dimension: '2d-array' }, { dimension: '3d' }]));
|
|
98
|
+
});
|
|
99
|
+
});
|
package/src/builder.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
textureHandle,
|
|
16
16
|
textureViewHandle,
|
|
17
17
|
} from './kernel-internal.js';
|
|
18
|
+
import { isTextureViewDimensionCompatible } from './resource-registry.js';
|
|
18
19
|
import type {
|
|
19
20
|
CompiledRenderGraph,
|
|
20
21
|
CompiledRenderGraphInfo,
|
|
@@ -60,6 +61,60 @@ const TEXTURE_USAGE = {
|
|
|
60
61
|
|
|
61
62
|
let nextGeneration = 1;
|
|
62
63
|
|
|
64
|
+
function textureByteSize(
|
|
65
|
+
format: GPUTextureFormat,
|
|
66
|
+
extent: { readonly width: number; readonly height: number; readonly depthOrArrayLayers: number },
|
|
67
|
+
mipLevelCount: number,
|
|
68
|
+
): number | undefined {
|
|
69
|
+
const bytesPerTexel =
|
|
70
|
+
format === 'r8unorm' || format === 'r8snorm' || format === 'r8uint' || format === 'r8sint'
|
|
71
|
+
? 1
|
|
72
|
+
: format === 'rg8unorm' ||
|
|
73
|
+
format === 'rg8snorm' ||
|
|
74
|
+
format === 'rg8uint' ||
|
|
75
|
+
format === 'rg8sint'
|
|
76
|
+
? 2
|
|
77
|
+
: format === 'rgba8unorm' ||
|
|
78
|
+
format === 'rgba8unorm-srgb' ||
|
|
79
|
+
format === 'rgba8snorm' ||
|
|
80
|
+
format === 'rgba8uint' ||
|
|
81
|
+
format === 'rgba8sint' ||
|
|
82
|
+
format === 'r32float' ||
|
|
83
|
+
format === 'r32uint' ||
|
|
84
|
+
format === 'r32sint'
|
|
85
|
+
? 4
|
|
86
|
+
: format === 'rg16float' ||
|
|
87
|
+
format === 'rg16uint' ||
|
|
88
|
+
format === 'rg16sint' ||
|
|
89
|
+
format === 'rg16snorm' ||
|
|
90
|
+
format === 'rg16unorm'
|
|
91
|
+
? 4
|
|
92
|
+
: format === 'rgba16float' ||
|
|
93
|
+
format === 'rgba16uint' ||
|
|
94
|
+
format === 'rgba16sint' ||
|
|
95
|
+
format === 'rgba16snorm' ||
|
|
96
|
+
format === 'rgba16unorm' ||
|
|
97
|
+
format === 'rg32float' ||
|
|
98
|
+
format === 'rg32uint' ||
|
|
99
|
+
format === 'rg32sint'
|
|
100
|
+
? 8
|
|
101
|
+
: format === 'rgba32float' || format === 'rgba32uint' || format === 'rgba32sint'
|
|
102
|
+
? 16
|
|
103
|
+
: undefined;
|
|
104
|
+
if (bytesPerTexel === undefined) return undefined;
|
|
105
|
+
let bytes = 0;
|
|
106
|
+
let width = extent.width;
|
|
107
|
+
let height = extent.height;
|
|
108
|
+
let depth = extent.depthOrArrayLayers;
|
|
109
|
+
for (let level = 0; level < mipLevelCount; level += 1) {
|
|
110
|
+
bytes += width * height * depth * bytesPerTexel;
|
|
111
|
+
width = Math.max(1, Math.floor(width / 2));
|
|
112
|
+
height = Math.max(1, Math.floor(height / 2));
|
|
113
|
+
depth = Math.max(1, Math.floor(depth / 2));
|
|
114
|
+
}
|
|
115
|
+
return bytes;
|
|
116
|
+
}
|
|
117
|
+
|
|
63
118
|
interface NormalizedRange {
|
|
64
119
|
readonly mipStart: number;
|
|
65
120
|
readonly mipEnd: number;
|
|
@@ -108,6 +163,8 @@ function textureUsage(access: GraphTextureAccess): number {
|
|
|
108
163
|
case 'storage-write':
|
|
109
164
|
case 'storage-read-write':
|
|
110
165
|
return TEXTURE_USAGE.storageBinding;
|
|
166
|
+
case 'sampled-storage-read-write':
|
|
167
|
+
return TEXTURE_USAGE.storageBinding | TEXTURE_USAGE.textureBinding;
|
|
111
168
|
case 'color-attachment':
|
|
112
169
|
case 'depth-stencil-read':
|
|
113
170
|
case 'depth-stencil-write':
|
|
@@ -125,6 +182,7 @@ function accessMode(access: GraphBufferAccess | GraphTextureAccess): {
|
|
|
125
182
|
} {
|
|
126
183
|
switch (access) {
|
|
127
184
|
case 'storage-read-write':
|
|
185
|
+
case 'sampled-storage-read-write':
|
|
128
186
|
return { read: true, write: true };
|
|
129
187
|
case 'storage-write':
|
|
130
188
|
case 'color-attachment':
|
|
@@ -160,6 +218,7 @@ function freezeInfo(info: CompiledRenderGraphInfo): CompiledRenderGraphInfo {
|
|
|
160
218
|
return Object.freeze({ ...descriptor, size });
|
|
161
219
|
};
|
|
162
220
|
return Object.freeze({
|
|
221
|
+
generation: info.generation,
|
|
163
222
|
passes: Object.freeze(
|
|
164
223
|
info.passes.map((pass) =>
|
|
165
224
|
Object.freeze({
|
|
@@ -351,7 +410,20 @@ export class RenderGraphBuilder<FrameCtx extends RenderGraphFrame> {
|
|
|
351
410
|
);
|
|
352
411
|
if (!allocated.ok) return allocated;
|
|
353
412
|
|
|
413
|
+
const generation = nextGeneration;
|
|
414
|
+
const physicalAllocationKeys = new WeakMap<object, string>();
|
|
415
|
+
let nextPhysicalAllocationKey = 1;
|
|
416
|
+
const physicalKey = (resource: CompiledResource<FrameCtx>): string | undefined => {
|
|
417
|
+
const handle = resource.texture ?? resource.buffer;
|
|
418
|
+
if (handle === undefined) return undefined;
|
|
419
|
+
const existing = physicalAllocationKeys.get(handle);
|
|
420
|
+
if (existing !== undefined) return existing;
|
|
421
|
+
const key = `allocation-${nextPhysicalAllocationKey++}`;
|
|
422
|
+
physicalAllocationKeys.set(handle, key);
|
|
423
|
+
return key;
|
|
424
|
+
};
|
|
354
425
|
const info = freezeInfo({
|
|
426
|
+
generation,
|
|
355
427
|
passes: analyzed.value.passes.map((pass, executionIndex) => ({
|
|
356
428
|
name: pass.name,
|
|
357
429
|
kind: pass.pass.kind,
|
|
@@ -367,31 +439,63 @@ export class RenderGraphBuilder<FrameCtx extends RenderGraphFrame> {
|
|
|
367
439
|
(dependency) => analyzed.value.passes[dependency]?.name ?? 'unknown',
|
|
368
440
|
),
|
|
369
441
|
})),
|
|
370
|
-
resources: [...allocated.value.resources.values()].map((resource) =>
|
|
371
|
-
|
|
372
|
-
kind: resource.record.kind,
|
|
373
|
-
origin: resource.record.origin,
|
|
374
|
-
descriptor:
|
|
442
|
+
resources: [...allocated.value.resources.values()].map((resource) => {
|
|
443
|
+
const texture =
|
|
375
444
|
resource.record.kind === 'texture'
|
|
376
|
-
?
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
445
|
+
? (resource.record.descriptor as GraphTextureDescriptor)
|
|
446
|
+
: undefined;
|
|
447
|
+
const buffer =
|
|
448
|
+
resource.record.kind === 'buffer'
|
|
449
|
+
? (resource.record.descriptor as GraphBufferDescriptor)
|
|
450
|
+
: undefined;
|
|
451
|
+
const allocationKey = physicalKey(resource);
|
|
452
|
+
const extent =
|
|
453
|
+
texture === undefined ? undefined : this.resolveExtent(texture.size, options.surfaceSize);
|
|
454
|
+
return {
|
|
455
|
+
label: resource.record.label,
|
|
456
|
+
kind: resource.record.kind,
|
|
457
|
+
origin: resource.record.origin,
|
|
458
|
+
descriptor:
|
|
459
|
+
texture === undefined
|
|
460
|
+
? {
|
|
461
|
+
kind: 'buffer' as const,
|
|
462
|
+
size: buffer?.size ?? 0,
|
|
463
|
+
}
|
|
464
|
+
: {
|
|
465
|
+
kind: 'texture' as const,
|
|
466
|
+
format: texture.format,
|
|
467
|
+
...(texture.domain === undefined ? {} : { domain: texture.domain }),
|
|
468
|
+
size: texture.size,
|
|
469
|
+
width: extent?.width ?? 1,
|
|
470
|
+
height: extent?.height ?? 1,
|
|
471
|
+
depthOrArrayLayers: extent?.depthOrArrayLayers ?? 1,
|
|
472
|
+
mipLevelCount: texture.mipLevelCount ?? 1,
|
|
473
|
+
sampleCount: texture.sampleCount ?? 1,
|
|
474
|
+
},
|
|
475
|
+
firstUse: resource.firstUse,
|
|
476
|
+
lastUse: resource.lastUse,
|
|
477
|
+
derivedUsage: resource.usage,
|
|
478
|
+
...(allocationKey === undefined ? {} : { physicalAllocationKey: allocationKey }),
|
|
479
|
+
...(texture === undefined ? {} : { format: texture.format }),
|
|
480
|
+
...(texture === undefined
|
|
481
|
+
? buffer === undefined
|
|
482
|
+
? {}
|
|
483
|
+
: { byteSize: buffer.size }
|
|
387
484
|
: {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
485
|
+
byteSize: textureByteSize(
|
|
486
|
+
texture.format,
|
|
487
|
+
this.resolveExtent(texture.size, options.surfaceSize),
|
|
488
|
+
texture.mipLevelCount ?? 1,
|
|
489
|
+
),
|
|
490
|
+
}),
|
|
491
|
+
...(texture === undefined
|
|
492
|
+
? {}
|
|
493
|
+
: {
|
|
494
|
+
dimension: texture.dimension ?? '2d',
|
|
495
|
+
extent,
|
|
496
|
+
}),
|
|
497
|
+
};
|
|
498
|
+
}),
|
|
395
499
|
});
|
|
396
500
|
|
|
397
501
|
const colorTargetDescriptors = new Map<string, ResolvedColorTargetDescriptor>();
|
|
@@ -717,7 +821,11 @@ export class RenderGraphBuilder<FrameCtx extends RenderGraphFrame> {
|
|
|
717
821
|
continue;
|
|
718
822
|
}
|
|
719
823
|
if (!left.write && !right.write) continue;
|
|
720
|
-
if (
|
|
824
|
+
if (
|
|
825
|
+
left.usage === right.usage &&
|
|
826
|
+
(left.usage === 'storage-read-write' || left.usage === 'sampled-storage-read-write')
|
|
827
|
+
)
|
|
828
|
+
continue;
|
|
721
829
|
const label = this.resources.get(left.resourceId)?.label;
|
|
722
830
|
return err(
|
|
723
831
|
new RenderGraphError({
|
|
@@ -891,6 +999,27 @@ export class RenderGraphBuilder<FrameCtx extends RenderGraphFrame> {
|
|
|
891
999
|
}
|
|
892
1000
|
}
|
|
893
1001
|
}
|
|
1002
|
+
for (const view of this.views.values()) {
|
|
1003
|
+
const texture = this.resources.get(view.textureId);
|
|
1004
|
+
if (texture?.kind !== 'texture') continue;
|
|
1005
|
+
const allocationDimension = texture.descriptor.dimension ?? '2d';
|
|
1006
|
+
const viewDimension = view.descriptor.dimension;
|
|
1007
|
+
if (!isTextureViewDimensionCompatible(allocationDimension, viewDimension)) {
|
|
1008
|
+
return err(
|
|
1009
|
+
new RenderGraphError({
|
|
1010
|
+
code: 'resource-descriptor-invalid',
|
|
1011
|
+
expected: `texture '${texture.label}' view dimension matches allocation dimension`,
|
|
1012
|
+
hint: 'use a 3d view only for a 3d allocation and preserve array views on 2d allocations',
|
|
1013
|
+
detail: {
|
|
1014
|
+
resourceLabel: texture.label,
|
|
1015
|
+
field: 'dimension',
|
|
1016
|
+
expected: allocationDimension,
|
|
1017
|
+
actual: viewDimension ?? '2d',
|
|
1018
|
+
},
|
|
1019
|
+
}),
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
894
1023
|
return ok(undefined);
|
|
895
1024
|
}
|
|
896
1025
|
|
package/src/resource-registry.ts
CHANGED
|
@@ -26,6 +26,16 @@ import type {
|
|
|
26
26
|
} from './graph.js';
|
|
27
27
|
import type { ColorValueDomain } from './pipeline/color-value-domain.js';
|
|
28
28
|
|
|
29
|
+
/** Check the only allocation/view dimension combinations supported by WebGPU. */
|
|
30
|
+
export function isTextureViewDimensionCompatible(
|
|
31
|
+
allocationDimension: GPUTextureDimension,
|
|
32
|
+
viewDimension: GPUTextureViewDimension | undefined,
|
|
33
|
+
): boolean {
|
|
34
|
+
if (viewDimension === undefined) return true;
|
|
35
|
+
if (allocationDimension === '3d') return viewDimension === '3d';
|
|
36
|
+
return viewDimension !== '3d';
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
/**
|
|
30
40
|
* Per-resource GPU allocation metadata carried through compile.
|
|
31
41
|
* When the resource was registered via addColorTarget, colorTarget
|
package/src/types.ts
CHANGED
|
@@ -97,6 +97,7 @@ export type GraphTextureAccess =
|
|
|
97
97
|
| 'storage-read'
|
|
98
98
|
| 'storage-write'
|
|
99
99
|
| 'storage-read-write'
|
|
100
|
+
| 'sampled-storage-read-write'
|
|
100
101
|
| 'color-attachment'
|
|
101
102
|
| 'depth-stencil-read'
|
|
102
103
|
| 'depth-stencil-write'
|
|
@@ -215,7 +216,20 @@ export interface CompiledRenderGraphInfo {
|
|
|
215
216
|
readonly firstUse: number | null;
|
|
216
217
|
readonly lastUse: number | null;
|
|
217
218
|
readonly derivedUsage: number;
|
|
219
|
+
/** Stable compile-local identity of the physical RHI allocation. */
|
|
220
|
+
readonly physicalAllocationKey?: string | undefined;
|
|
221
|
+
/** Descriptor-derived byte size when the format is uncompressed and known. */
|
|
222
|
+
readonly byteSize?: number | undefined;
|
|
223
|
+
/** Texture format retained for producer-owned resource inspection. */
|
|
224
|
+
readonly format?: TextureFormat | undefined;
|
|
225
|
+
/** Texture allocation facts retained for capability/lifetime inspection. */
|
|
226
|
+
readonly dimension?: GPUTextureDimension | undefined;
|
|
227
|
+
readonly extent?:
|
|
228
|
+
| { readonly width: number; readonly height: number; readonly depthOrArrayLayers: number }
|
|
229
|
+
| undefined;
|
|
218
230
|
}[];
|
|
231
|
+
/** Monotonic graph generation assigned when this graph was compiled. */
|
|
232
|
+
readonly generation: number;
|
|
219
233
|
}
|
|
220
234
|
|
|
221
235
|
export interface RenderGraphFrame {
|