From 90b96069d26666c92d109646c8762cbed18497e1 Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Thu, 2 Jul 2026 16:00:02 +0200 Subject: [PATCH 1/9] Remove .value from bindGroupLayout --- packages/typegpu/src/tgpuBindGroupLayout.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/typegpu/src/tgpuBindGroupLayout.ts b/packages/typegpu/src/tgpuBindGroupLayout.ts index 0f69e1c4a8..f7b31c6d99 100644 --- a/packages/typegpu/src/tgpuBindGroupLayout.ts +++ b/packages/typegpu/src/tgpuBindGroupLayout.ts @@ -268,12 +268,6 @@ export interface TgpuBindGroupLayout< readonly [$gpuValueOf]: { [K in keyof Entries]: InferLayoutEntry; }; - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: { - [K in keyof Entries]: InferLayoutEntry; - }; readonly $: { [K in keyof Entries]: InferLayoutEntry; }; @@ -418,11 +412,7 @@ class TgpuBindGroupLayoutImpl< readonly [$internal]: ResolvableObject[]; readonly resourceType = 'bind-group-layout' as const; - readonly value = {} as { - [K in keyof Entries]: InferLayoutEntry; - }; - - readonly $ = this.value as { + readonly $ = {} as { [K in keyof Entries]: InferLayoutEntry; }; @@ -476,7 +466,7 @@ class TgpuBindGroupLayoutImpl< } invariant(item !== undefined, 'Internal error, expected item to be defined'); - Object.defineProperty(this.value, key, { + Object.defineProperty(this.$, key, { get: () => { return item.$; }, From 2290b5355eb6ef08c93ab0a9b017f01daac3fa2a Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Thu, 2 Jul 2026 17:13:41 +0200 Subject: [PATCH 2/9] Remove .value from buffer shorthands --- .../typegpu/src/core/buffer/bufferShorthand.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/typegpu/src/core/buffer/bufferShorthand.ts b/packages/typegpu/src/core/buffer/bufferShorthand.ts index 3f86942dcf..495613493e 100644 --- a/packages/typegpu/src/core/buffer/bufferShorthand.ts +++ b/packages/typegpu/src/core/buffer/bufferShorthand.ts @@ -33,10 +33,6 @@ export interface TgpuMutable extends TgpuBufferShort readonly buffer: TgpuBuffer & StorageFlag; // Accessible on the GPU - /** - * @deprecated Use `.$` instead, works the same way. - */ - value: InferGPU; $: InferGPU; // --- } @@ -46,10 +42,6 @@ export interface TgpuReadonly extends TgpuBufferShor readonly buffer: TgpuBuffer & StorageFlag; // Accessible on the GPU - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: InferGPU; readonly $: InferGPU; // --- } @@ -59,10 +51,6 @@ export interface TgpuUniform extends TgpuBufferShort readonly buffer: TgpuBuffer & UniformFlag; // Accessible on the GPU - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: InferGPU; readonly $: InferGPU; // --- } @@ -135,10 +123,6 @@ export class TgpuBufferShorthandImpl< return this.#usage.$; } - get value(): InferGPU { - return this.$; - } - toString(): string { return `${this.resourceType}BufferShorthand:${getName(this) ?? ''}`; } From 49c06611232f41cb7a92b1215e9989b25faf03ab Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:25:49 +0200 Subject: [PATCH 3/9] Remove value from const --- packages/typegpu/src/core/constant/tgpuConstant.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/typegpu/src/core/constant/tgpuConstant.ts b/packages/typegpu/src/core/constant/tgpuConstant.ts index b8d8458c70..12b13a3f55 100644 --- a/packages/typegpu/src/core/constant/tgpuConstant.ts +++ b/packages/typegpu/src/core/constant/tgpuConstant.ts @@ -24,10 +24,6 @@ type DeepReadonly = T extends { [$internal]: unknown } export interface TgpuConst extends TgpuNamable { readonly resourceType: 'const'; readonly [$gpuValueOf]: DeepReadonly>; - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: DeepReadonly>; readonly $: DeepReadonly>; readonly [$internal]: { @@ -144,8 +140,4 @@ class TgpuConstImpl implements TgpuConst, return this.#value; } - - get value(): DeepReadonly> { - return this.$; - } } From ede7a33f22b0e841c39f0a8c55bbcf36ec700627 Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:26:52 +0200 Subject: [PATCH 4/9] Remove value form rawCodeSnippet --- .../typegpu/src/core/rawCodeSnippet/tgpuRawCodeSnippet.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/typegpu/src/core/rawCodeSnippet/tgpuRawCodeSnippet.ts b/packages/typegpu/src/core/rawCodeSnippet/tgpuRawCodeSnippet.ts index b07010e7f3..f2bc1c8b1b 100644 --- a/packages/typegpu/src/core/rawCodeSnippet/tgpuRawCodeSnippet.ts +++ b/packages/typegpu/src/core/rawCodeSnippet/tgpuRawCodeSnippet.ts @@ -18,7 +18,6 @@ import { valueProxyHandler } from '../valueProxyUtils.ts'; */ export interface TgpuRawCodeSnippet { $: InferGPU; - value: InferGPU; readonly [$gpuValueOf]: InferGPU; $uses(dependencyMap: Record): this; @@ -146,8 +145,4 @@ class TgpuRawCodeSnippetImpl return this[$gpuValueOf]; } - - get value(): InferGPU { - return this.$; - } } From 8681eba9cc17be51df9a05b2e763269a373bc05b Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:29:36 +0200 Subject: [PATCH 5/9] Remove value from samplers --- packages/typegpu/src/core/sampler/sampler.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/typegpu/src/core/sampler/sampler.ts b/packages/typegpu/src/core/sampler/sampler.ts index f5b20dd37e..295eafe0bd 100644 --- a/packages/typegpu/src/core/sampler/sampler.ts +++ b/packages/typegpu/src/core/sampler/sampler.ts @@ -30,7 +30,6 @@ export interface TgpuSampler { readonly schema: WgslSampler; readonly [$gpuValueOf]: Infer; - value: Infer; $: Infer; toString(): string; @@ -42,7 +41,6 @@ export interface TgpuComparisonSampler { readonly schema: WgslComparisonSampler; readonly [$gpuValueOf]: Infer; - value: Infer; $: Infer; toString(): string; @@ -140,10 +138,6 @@ export class TgpuLaidOutSamplerImpl< ); } - get value(): Infer { - return this.$; - } - toString() { return `${this.resourceType}:${getName(this) ?? ''}`; } @@ -231,10 +225,6 @@ class TgpuFixedSamplerImpl ); } - get value(): Infer { - return this.$; - } - $name(label: string) { setName(this, label); return this; From 37183d9c55eaf321f8b9ab5928ad1dae324647be Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:32:05 +0200 Subject: [PATCH 6/9] Remove value from accessor --- packages/typegpu/src/core/slot/accessor.ts | 4 ---- packages/typegpu/src/core/slot/slotTypes.ts | 5 ----- 2 files changed, 9 deletions(-) diff --git a/packages/typegpu/src/core/slot/accessor.ts b/packages/typegpu/src/core/slot/accessor.ts index 43f252f20d..1cb4b7751c 100644 --- a/packages/typegpu/src/core/slot/accessor.ts +++ b/packages/typegpu/src/core/slot/accessor.ts @@ -146,10 +146,6 @@ abstract class AccessorBase< abstract readonly $: InferGPU; - get value(): InferGPU { - return this.$; - } - [$resolve](ctx: ResolutionCtx): ResolvedSnippet { const snippet = this.#createSnippet(); return snip( diff --git a/packages/typegpu/src/core/slot/slotTypes.ts b/packages/typegpu/src/core/slot/slotTypes.ts index 905e461d0b..e1f12c94c0 100644 --- a/packages/typegpu/src/core/slot/slotTypes.ts +++ b/packages/typegpu/src/core/slot/slotTypes.ts @@ -58,10 +58,6 @@ export interface TgpuAccessor extends TgpuNamable readonly slot: TgpuSlot>; readonly [$gpuValueOf]: InferGPU; - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: InferGPU; readonly $: InferGPU; toString(): string; @@ -95,7 +91,6 @@ export interface TgpuMutableAccessor extends Tgpu readonly slot: TgpuSlot>; readonly [$gpuValueOf]: InferGPU; - value: InferGPU; $: InferGPU; } From 57d4ea196bf380c0f8cfe561e186e1abcc2888a6 Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:33:28 +0200 Subject: [PATCH 7/9] Remove value from texture --- packages/typegpu/src/core/texture/texture.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/typegpu/src/core/texture/texture.ts b/packages/typegpu/src/core/texture/texture.ts index ac15188d00..873c44bf32 100644 --- a/packages/typegpu/src/core/texture/texture.ts +++ b/packages/typegpu/src/core/texture/texture.ts @@ -179,7 +179,6 @@ export interface TgpuTextureView< readonly size?: number[] | undefined; readonly [$gpuValueOf]: Infer; - value: Infer; $: Infer; toString(): string; @@ -590,10 +589,6 @@ class TgpuFixedTextureViewImpl ); } - get value(): Infer { - return this.$; - } - get size(): number[] { return this.#baseTexture.props.size; } @@ -687,10 +682,6 @@ export class TgpuLaidOutTextureViewImpl { - return this.$; - } - $name(label: string): this { setName(this, label); return this; From 464c93e0e3e21569093e8269713a534a73a176b1 Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:35:14 +0200 Subject: [PATCH 8/9] Remove more values --- packages/typegpu/src/core/slot/lazy.ts | 4 ---- packages/typegpu/src/core/slot/slot.ts | 6 +----- packages/typegpu/src/core/slot/slotTypes.ts | 8 -------- packages/typegpu/src/core/texture/externalTexture.ts | 4 ---- packages/typegpu/src/core/variable/tgpuVariable.ts | 4 ---- 5 files changed, 1 insertion(+), 25 deletions(-) diff --git a/packages/typegpu/src/core/slot/lazy.ts b/packages/typegpu/src/core/slot/lazy.ts index 896082aee0..6ee08b091e 100644 --- a/packages/typegpu/src/core/slot/lazy.ts +++ b/packages/typegpu/src/core/slot/lazy.ts @@ -51,10 +51,6 @@ class TgpuLazyImpl implements TgpuLazy { return getGpuValueRecursively(ctx.unwrap(this)); } - get value(): GPUValueOf { - return this[$gpuValueOf]; - } - get $(): GPUValueOf { return this[$gpuValueOf]; } diff --git a/packages/typegpu/src/core/slot/slot.ts b/packages/typegpu/src/core/slot/slot.ts index b705e46de7..387b1a553d 100644 --- a/packages/typegpu/src/core/slot/slot.ts +++ b/packages/typegpu/src/core/slot/slot.ts @@ -48,11 +48,7 @@ class TgpuSlotImpl implements TgpuSlot { return getGpuValueRecursively(ctx.unwrap(this)); } - get value(): GPUValueOf { - return this[$gpuValueOf]; - } - get $(): GPUValueOf { - return this.value; + return this[$gpuValueOf]; } } diff --git a/packages/typegpu/src/core/slot/slotTypes.ts b/packages/typegpu/src/core/slot/slotTypes.ts index e1f12c94c0..c42efa0ecf 100644 --- a/packages/typegpu/src/core/slot/slotTypes.ts +++ b/packages/typegpu/src/core/slot/slotTypes.ts @@ -23,10 +23,6 @@ export interface TgpuSlot extends TgpuNamable { areEqual(a: T, b: T): boolean; readonly [$gpuValueOf]: GPUValueOf; - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: GPUValueOf; readonly $: GPUValueOf; toString(): string; } @@ -38,10 +34,6 @@ export interface TgpuLazy extends Withable> { readonly resourceType: 'lazy'; readonly [$gpuValueOf]: GPUValueOf; - /** - * @deprecated Use `.$` instead, works the same way. - */ - readonly value: GPUValueOf; readonly $: GPUValueOf; // Type-tokens, not available at runtime diff --git a/packages/typegpu/src/core/texture/externalTexture.ts b/packages/typegpu/src/core/texture/externalTexture.ts index 78ae4cd582..66a76fafdb 100644 --- a/packages/typegpu/src/core/texture/externalTexture.ts +++ b/packages/typegpu/src/core/texture/externalTexture.ts @@ -75,10 +75,6 @@ export class TgpuExternalTextureImpl implements TgpuExternalTexture, SelfResolva ); } - get value(): Infer { - return this.$; - } - toString() { return `textureExternal:${getName(this) ?? ''}`; } diff --git a/packages/typegpu/src/core/variable/tgpuVariable.ts b/packages/typegpu/src/core/variable/tgpuVariable.ts index e5d39b4aa2..73483a2d53 100644 --- a/packages/typegpu/src/core/variable/tgpuVariable.ts +++ b/packages/typegpu/src/core/variable/tgpuVariable.ts @@ -178,10 +178,6 @@ class TgpuVarImpl assertExhaustive(mode, 'tgpuVariable.ts#TgpuVarImpl/$'); } - get value(): InferGPU { - return this.$; - } - set value(v: InferGPU) { this.$ = v; } From 4135755c2b3e8f1d40a50f74ff9d661c0470ed76 Mon Sep 17 00:00:00 2001 From: Aleksander Katan <56294622+aleksanderkatan@users.noreply.github.com> Date: Tue, 7 Jul 2026 12:15:58 +0200 Subject: [PATCH 9/9] Update tgpuVariable --- packages/typegpu/src/core/variable/tgpuVariable.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/typegpu/src/core/variable/tgpuVariable.ts b/packages/typegpu/src/core/variable/tgpuVariable.ts index 73483a2d53..8a1e0827f0 100644 --- a/packages/typegpu/src/core/variable/tgpuVariable.ts +++ b/packages/typegpu/src/core/variable/tgpuVariable.ts @@ -23,10 +23,6 @@ export interface TgpuVar< > extends TgpuNamable { readonly resourceType: 'var'; readonly [$gpuValueOf]: InferGPU; - /** - * @deprecated Use `.$` instead, works the same way. - */ - value: InferGPU; $: InferGPU; readonly [$internal]: { @@ -177,8 +173,4 @@ class TgpuVarImpl assertExhaustive(mode, 'tgpuVariable.ts#TgpuVarImpl/$'); } - - set value(v: InferGPU) { - this.$ = v; - } }