diff --git a/packages/typegpu/src/tgsl/accessIndex.ts b/packages/typegpu/src/codegen/accessIndex.ts similarity index 100% rename from packages/typegpu/src/tgsl/accessIndex.ts rename to packages/typegpu/src/codegen/accessIndex.ts diff --git a/packages/typegpu/src/tgsl/accessProp.ts b/packages/typegpu/src/codegen/accessProp.ts similarity index 100% rename from packages/typegpu/src/tgsl/accessProp.ts rename to packages/typegpu/src/codegen/accessProp.ts diff --git a/packages/typegpu/src/tgsl/consoleLog/deserializers.ts b/packages/typegpu/src/codegen/consoleLog/deserializers.ts similarity index 100% rename from packages/typegpu/src/tgsl/consoleLog/deserializers.ts rename to packages/typegpu/src/codegen/consoleLog/deserializers.ts diff --git a/packages/typegpu/src/tgsl/consoleLog/logGenerator.ts b/packages/typegpu/src/codegen/consoleLog/logGenerator.ts similarity index 100% rename from packages/typegpu/src/tgsl/consoleLog/logGenerator.ts rename to packages/typegpu/src/codegen/consoleLog/logGenerator.ts diff --git a/packages/typegpu/src/tgsl/consoleLog/serializers.ts b/packages/typegpu/src/codegen/consoleLog/serializers.ts similarity index 100% rename from packages/typegpu/src/tgsl/consoleLog/serializers.ts rename to packages/typegpu/src/codegen/consoleLog/serializers.ts diff --git a/packages/typegpu/src/tgsl/consoleLog/types.ts b/packages/typegpu/src/codegen/consoleLog/types.ts similarity index 100% rename from packages/typegpu/src/tgsl/consoleLog/types.ts rename to packages/typegpu/src/codegen/consoleLog/types.ts diff --git a/packages/typegpu/src/tgsl/conversion.ts b/packages/typegpu/src/codegen/conversion.ts similarity index 100% rename from packages/typegpu/src/tgsl/conversion.ts rename to packages/typegpu/src/codegen/conversion.ts diff --git a/packages/typegpu/src/tgsl/forOfUtils.ts b/packages/typegpu/src/codegen/forOfUtils.ts similarity index 100% rename from packages/typegpu/src/tgsl/forOfUtils.ts rename to packages/typegpu/src/codegen/forOfUtils.ts diff --git a/packages/typegpu/src/tgsl/generationHelpers.ts b/packages/typegpu/src/codegen/generationHelpers.ts similarity index 100% rename from packages/typegpu/src/tgsl/generationHelpers.ts rename to packages/typegpu/src/codegen/generationHelpers.ts diff --git a/packages/typegpu/src/tgsl/math.ts b/packages/typegpu/src/codegen/math.ts similarity index 100% rename from packages/typegpu/src/tgsl/math.ts rename to packages/typegpu/src/codegen/math.ts diff --git a/packages/typegpu/src/tgsl/shaderGenerator.ts b/packages/typegpu/src/codegen/shaderGenerator.ts similarity index 100% rename from packages/typegpu/src/tgsl/shaderGenerator.ts rename to packages/typegpu/src/codegen/shaderGenerator.ts diff --git a/packages/typegpu/src/tgsl/shaderGenerator_members.ts b/packages/typegpu/src/codegen/shaderGenerator_members.ts similarity index 100% rename from packages/typegpu/src/tgsl/shaderGenerator_members.ts rename to packages/typegpu/src/codegen/shaderGenerator_members.ts diff --git a/packages/typegpu/src/tgsl/shellless.ts b/packages/typegpu/src/codegen/shellless.ts similarity index 100% rename from packages/typegpu/src/tgsl/shellless.ts rename to packages/typegpu/src/codegen/shellless.ts diff --git a/packages/typegpu/src/tgsl/wgslGenerator.ts b/packages/typegpu/src/codegen/wgslGenerator.ts similarity index 100% rename from packages/typegpu/src/tgsl/wgslGenerator.ts rename to packages/typegpu/src/codegen/wgslGenerator.ts diff --git a/packages/typegpu/src/core/function/comptime.ts b/packages/typegpu/src/core/function/comptime.ts index 649de92e51..1269802f2a 100644 --- a/packages/typegpu/src/core/function/comptime.ts +++ b/packages/typegpu/src/core/function/comptime.ts @@ -1,7 +1,7 @@ import { WgslTypeError } from '../../errors.ts'; import { setName, type TgpuNamable } from '../../shared/meta.ts'; import { $getNameForward, $gpuCallable, $internal } from '../../shared/symbols.ts'; -import { coerceToSnippet } from '../../tgsl/generationHelpers.ts'; +import { coerceToSnippet } from '../../codegen/generationHelpers.ts'; import { type DualFn, isKnownAtComptime } from '../../types.ts'; type AnyFn = (...args: never[]) => unknown; diff --git a/packages/typegpu/src/core/function/createCallableSchema.ts b/packages/typegpu/src/core/function/createCallableSchema.ts index 970c950fa8..e3d6f04691 100644 --- a/packages/typegpu/src/core/function/createCallableSchema.ts +++ b/packages/typegpu/src/core/function/createCallableSchema.ts @@ -2,7 +2,7 @@ import { type MapValueToSnippet, type ResolvedSnippet, snip } from '../../data/s import { type BaseData, isPtr } from '../../data/wgslTypes.ts'; import { setName } from '../../shared/meta.ts'; import { $gpuCallable } from '../../shared/symbols.ts'; -import { tryConvertSnippet } from '../../tgsl/conversion.ts'; +import { tryConvertSnippet } from '../../codegen/conversion.ts'; import { type DualFn, isKnownAtComptime, NormalState, type ResolutionCtx } from '../../types.ts'; import type { AnyFn } from './fnTypes.ts'; diff --git a/packages/typegpu/src/core/function/dualImpl.ts b/packages/typegpu/src/core/function/dualImpl.ts index 4f54ac49be..8b5bad1185 100644 --- a/packages/typegpu/src/core/function/dualImpl.ts +++ b/packages/typegpu/src/core/function/dualImpl.ts @@ -1,8 +1,8 @@ import { type MapValueToSnippet, snip } from '../../data/snippet.ts'; import { setName } from '../../shared/meta.ts'; import { $gpuCallable } from '../../shared/symbols.ts'; -import { tryConvertSnippet } from '../../tgsl/conversion.ts'; -import { concretize } from '../../tgsl/generationHelpers.ts'; +import { tryConvertSnippet } from '../../codegen/conversion.ts'; +import { concretize } from '../../codegen/generationHelpers.ts'; import { type DualFn, isKnownAtComptime, NormalState, type ResolutionCtx } from '../../types.ts'; import { type BaseData, isPtr } from '../../data/wgslTypes.ts'; diff --git a/packages/typegpu/src/core/pipeline/computePipeline.ts b/packages/typegpu/src/core/pipeline/computePipeline.ts index 48f6499742..f54c84dcbd 100644 --- a/packages/typegpu/src/core/pipeline/computePipeline.ts +++ b/packages/typegpu/src/core/pipeline/computePipeline.ts @@ -16,8 +16,8 @@ import { type TgpuLayoutEntry, } from '../../tgpuBindGroupLayout.ts'; import { isGPUCommandEncoder, isGPUComputePassEncoder } from './typeGuards.ts'; -import { logDataFromGPU } from '../../tgsl/consoleLog/deserializers.ts'; -import type { LogResources } from '../../tgsl/consoleLog/types.ts'; +import { logDataFromGPU } from '../../codegen/consoleLog/deserializers.ts'; +import type { LogResources } from '../../codegen/consoleLog/types.ts'; import { isGPUBuffer, type ResolutionCtx, type SelfResolvable } from '../../types.ts'; import { wgslExtensions, wgslExtensionToFeatureName } from '../../wgslExtensions.ts'; import type { IORecord } from '../function/fnTypes.ts'; diff --git a/packages/typegpu/src/core/pipeline/renderPipeline.ts b/packages/typegpu/src/core/pipeline/renderPipeline.ts index d558aeb8d8..1e5dc21d31 100644 --- a/packages/typegpu/src/core/pipeline/renderPipeline.ts +++ b/packages/typegpu/src/core/pipeline/renderPipeline.ts @@ -34,8 +34,8 @@ import { type TgpuBindGroupLayout, type TgpuLayoutEntry, } from '../../tgpuBindGroupLayout.ts'; -import { logDataFromGPU } from '../../tgsl/consoleLog/deserializers.ts'; -import type { LogResources } from '../../tgsl/consoleLog/types.ts'; +import { logDataFromGPU } from '../../codegen/consoleLog/deserializers.ts'; +import type { LogResources } from '../../codegen/consoleLog/types.ts'; import type { ResolutionCtx, SelfResolvable } from '../../types.ts'; import { isGPUBuffer } from '../../types.ts'; import { wgslExtensions, wgslExtensionToFeatureName } from '../../wgslExtensions.ts'; diff --git a/packages/typegpu/src/core/resolve/namespace.ts b/packages/typegpu/src/core/resolve/namespace.ts index f112cd4fb0..a7ad6b9e10 100644 --- a/packages/typegpu/src/core/resolve/namespace.ts +++ b/packages/typegpu/src/core/resolve/namespace.ts @@ -2,7 +2,7 @@ import type { ResolvedSnippet } from '../../data/snippet.ts'; import { type NameRegistry, RandomNameRegistry, StrictNameRegistry } from '../../nameRegistry.ts'; import { getName } from '../../shared/meta.ts'; import { $internal } from '../../shared/symbols.ts'; -import { ShelllessRepository } from '../../tgsl/shellless.ts'; +import { ShelllessRepository } from '../../codegen/shellless.ts'; import type { TgpuLazy, TgpuSlot } from '../slot/slotTypes.ts'; type SlotToValueMap = Map, unknown>; diff --git a/packages/typegpu/src/core/resolve/tgpuResolve.ts b/packages/typegpu/src/core/resolve/tgpuResolve.ts index ab3aae7e08..e46fb58ebb 100644 --- a/packages/typegpu/src/core/resolve/tgpuResolve.ts +++ b/packages/typegpu/src/core/resolve/tgpuResolve.ts @@ -3,7 +3,7 @@ import { Void } from '../../data/wgslTypes.ts'; import { type ResolutionResult, resolve as resolveImpl } from '../../resolutionCtx.ts'; import { $internal, $resolve } from '../../shared/symbols.ts'; import { isBindGroupLayout } from '../../tgpuBindGroupLayout.ts'; -import type { ShaderGenerator } from '../../tgsl/shaderGenerator.ts'; +import type { ShaderGenerator } from '../../codegen/shaderGenerator.ts'; import type { ResolvableObject, SelfResolvable, Wgsl } from '../../types.ts'; import type { WgslExtension } from '../../wgslExtensions.ts'; import { isPipeline } from '../pipeline/typeGuards.ts'; diff --git a/packages/typegpu/src/core/root/init.ts b/packages/typegpu/src/core/root/init.ts index bc84ad408b..23176aa2b2 100644 --- a/packages/typegpu/src/core/root/init.ts +++ b/packages/typegpu/src/core/root/init.ts @@ -18,8 +18,8 @@ import type { TgpuLayoutEntry, } from '../../tgpuBindGroupLayout.ts'; import { isBindGroup, isBindGroupLayout, TgpuBindGroupImpl } from '../../tgpuBindGroupLayout.ts'; -import type { LogGeneratorOptions } from '../../tgsl/consoleLog/types.ts'; -import type { ShaderGenerator } from '../../tgsl/shaderGenerator.ts'; +import type { LogGeneratorOptions } from '../../codegen/consoleLog/types.ts'; +import type { ShaderGenerator } from '../../codegen/shaderGenerator.ts'; import { INTERNAL_createBuffer, isBuffer, diff --git a/packages/typegpu/src/core/root/rootTypes.ts b/packages/typegpu/src/core/root/rootTypes.ts index e6c5c8bf66..e8fae63bae 100644 --- a/packages/typegpu/src/core/root/rootTypes.ts +++ b/packages/typegpu/src/core/root/rootTypes.ts @@ -28,8 +28,8 @@ import type { TgpuBindGroupLayout, TgpuLayoutEntry, } from '../../tgpuBindGroupLayout.ts'; -import type { LogGeneratorOptions } from '../../tgsl/consoleLog/types.ts'; -import type { ShaderGenerator } from '../../tgsl/shaderGenerator.ts'; +import type { LogGeneratorOptions } from '../../codegen/consoleLog/types.ts'; +import type { ShaderGenerator } from '../../codegen/shaderGenerator.ts'; import type { Unwrapper } from '../../unwrapper.ts'; import type { TgpuBuffer, VertexFlag } from '../buffer/buffer.ts'; import type { TgpuMutable, TgpuReadonly, TgpuUniform } from '../buffer/bufferShorthand.ts'; diff --git a/packages/typegpu/src/core/simulate/tgpuSimulate.ts b/packages/typegpu/src/core/simulate/tgpuSimulate.ts index a0ca71b283..6a070763c8 100644 --- a/packages/typegpu/src/core/simulate/tgpuSimulate.ts +++ b/packages/typegpu/src/core/simulate/tgpuSimulate.ts @@ -1,7 +1,7 @@ import type { BaseData } from '../../data/wgslTypes.ts'; import { getResolutionCtx, provideCtx } from '../../execMode.ts'; import { ResolutionCtxImpl } from '../../resolutionCtx.ts'; -import wgslGenerator from '../../tgsl/wgslGenerator.ts'; +import wgslGenerator from '../../codegen/wgslGenerator.ts'; import { SimulationState } from '../../types.ts'; import type { TgpuBuffer } from '../buffer/buffer.ts'; import { namespace } from '../resolve/namespace.ts'; diff --git a/packages/typegpu/src/core/valueProxyUtils.ts b/packages/typegpu/src/core/valueProxyUtils.ts index ad401ea46e..3dae8a4003 100644 --- a/packages/typegpu/src/core/valueProxyUtils.ts +++ b/packages/typegpu/src/core/valueProxyUtils.ts @@ -1,8 +1,8 @@ import type { Snippet } from '../data/snippet.ts'; import { getGPUValue } from '../getGPUValue.ts'; import { $internal, $ownSnippet, $resolve } from '../shared/symbols.ts'; -import { accessIndex } from '../tgsl/accessIndex.ts'; -import { accessProp } from '../tgsl/accessProp.ts'; +import { accessIndex } from '../codegen/accessIndex.ts'; +import { accessProp } from '../codegen/accessProp.ts'; import { getOwnSnippet, type SelfResolvable, type WithOwnSnippet } from '../types.ts'; export const valueProxyHandler: ProxyHandler = { diff --git a/packages/typegpu/src/data/index.ts b/packages/typegpu/src/data/index.ts index 5eebe77415..85ea58627b 100644 --- a/packages/typegpu/src/data/index.ts +++ b/packages/typegpu/src/data/index.ts @@ -5,7 +5,7 @@ // NOTE: This is a barrel file, internal files should not import things from this file import { Operator } from 'tsover-runtime'; -import { type InfixOperator, infixOperators } from '../tgsl/accessProp.ts'; +import { type InfixOperator, infixOperators } from '../codegen/accessProp.ts'; import { MatBase } from './matrix.ts'; import { VecBase } from './vectorImpl.ts'; diff --git a/packages/typegpu/src/data/matrix.ts b/packages/typegpu/src/data/matrix.ts index b2fd9b3717..219a1476cc 100644 --- a/packages/typegpu/src/data/matrix.ts +++ b/packages/typegpu/src/data/matrix.ts @@ -4,7 +4,7 @@ import { dualImpl } from '../core/function/dualImpl.ts'; import { stitch } from '../core/resolve/stitch.ts'; import { $repr } from '../shared/symbols.ts'; import { $internal, $resolve } from '../shared/symbols.ts'; -import { numericLiteralToSnippet } from '../tgsl/generationHelpers.ts'; +import { numericLiteralToSnippet } from '../codegen/generationHelpers.ts'; import type { ResolutionCtx, SelfResolvable } from '../types.ts'; import { f32 } from './numeric.ts'; import { type ResolvedSnippet } from './snippet.ts'; diff --git a/packages/typegpu/src/data/vectorImpl.ts b/packages/typegpu/src/data/vectorImpl.ts index abb714d267..413cfbf2eb 100644 --- a/packages/typegpu/src/data/vectorImpl.ts +++ b/packages/typegpu/src/data/vectorImpl.ts @@ -1,5 +1,5 @@ import { $internal, $resolve } from '../shared/symbols.ts'; -import { numericLiteralToSnippet } from '../tgsl/generationHelpers.ts'; +import { numericLiteralToSnippet } from '../codegen/generationHelpers.ts'; import type { ResolutionCtx, SelfResolvable } from '../types.ts'; import { bool, f16, f32, i32, u32 } from './numeric.ts'; import { type ResolvedSnippet } from './snippet.ts'; diff --git a/packages/typegpu/src/indexNamedExports.ts b/packages/typegpu/src/indexNamedExports.ts index f21cff1bf3..b564857374 100644 --- a/packages/typegpu/src/indexNamedExports.ts +++ b/packages/typegpu/src/indexNamedExports.ts @@ -25,8 +25,8 @@ export { isTgpuFragmentFn } from './core/function/tgpuFragmentFn.ts'; export { isTgpuVertexFn } from './core/function/tgpuVertexFn.ts'; export { isTgpuComputeFn } from './core/function/tgpuComputeFn.ts'; export { isVariable } from './core/variable/tgpuVariable.ts'; -export { ShaderGenerator } from './tgsl/shaderGenerator.ts'; -export { WgslGenerator } from './tgsl/wgslGenerator.ts'; +export { ShaderGenerator } from './codegen/shaderGenerator.ts'; +export { WgslGenerator } from './codegen/wgslGenerator.ts'; // types diff --git a/packages/typegpu/src/resolutionCtx.ts b/packages/typegpu/src/resolutionCtx.ts index 5b3daa0067..57bd21587d 100644 --- a/packages/typegpu/src/resolutionCtx.ts +++ b/packages/typegpu/src/resolutionCtx.ts @@ -31,12 +31,16 @@ import { type TgpuBindGroupLayout, type TgpuLayoutEntry, } from './tgpuBindGroupLayout.ts'; -import { LogGeneratorImpl, LogGeneratorNullImpl } from './tgsl/consoleLog/logGenerator.ts'; -import type { LogGenerator, LogResources } from './tgsl/consoleLog/types.ts'; -import { getBestConversion } from './tgsl/conversion.ts'; -import { coerceToSnippet, concretize, numericLiteralToSnippet } from './tgsl/generationHelpers.ts'; -import type { ShaderGenerator } from './tgsl/shaderGenerator.ts'; -import wgslGenerator from './tgsl/wgslGenerator.ts'; +import { LogGeneratorImpl, LogGeneratorNullImpl } from './codegen/consoleLog/logGenerator.ts'; +import type { LogGenerator, LogResources } from './codegen/consoleLog/types.ts'; +import { getBestConversion } from './codegen/conversion.ts'; +import { + coerceToSnippet, + concretize, + numericLiteralToSnippet, +} from './codegen/generationHelpers.ts'; +import type { ShaderGenerator } from './codegen/shaderGenerator.ts'; +import wgslGenerator from './codegen/wgslGenerator.ts'; import type { ExecMode, ExecState, @@ -53,7 +57,7 @@ import { CodegenState, isSelfResolvable, NormalState } from './types.ts'; import type { WgslExtension } from './wgslExtensions.ts'; import { getName, hasTinyestMetadata, setName } from './shared/meta.ts'; import { FuncParameterType } from 'tinyest'; -import { accessProp } from './tgsl/accessProp.ts'; +import { accessProp } from './codegen/accessProp.ts'; import { createIoSchema } from './core/function/ioSchema.ts'; import type { IOData } from './core/function/fnTypes.ts'; import { AutoStruct } from './data/autoStruct.ts'; diff --git a/packages/typegpu/src/std/bitcast.ts b/packages/typegpu/src/std/bitcast.ts index 4039858dd9..997da12016 100644 --- a/packages/typegpu/src/std/bitcast.ts +++ b/packages/typegpu/src/std/bitcast.ts @@ -6,7 +6,7 @@ import { isVec } from '../data/wgslTypes.ts'; import { vec2f, vec2i, vec3f, vec3i, vec4f, vec4i } from '../data/vector.ts'; import { VectorOps } from '../data/vectorOps.ts'; import type { v2f, v2i, v2u, v3f, v3i, v3u, v4f, v4i, v4u } from '../data/wgslTypes.ts'; -import { unify } from '../tgsl/conversion.ts'; +import { unify } from '../codegen/conversion.ts'; export type BitcastU32toF32Overload = ((value: number) => number) & ((value: v2u) => v2f) & diff --git a/packages/typegpu/src/std/boolean.ts b/packages/typegpu/src/std/boolean.ts index bcb74ff623..d13d5d8a83 100644 --- a/packages/typegpu/src/std/boolean.ts +++ b/packages/typegpu/src/std/boolean.ts @@ -22,7 +22,7 @@ import { type v3b, type v4b, } from '../data/wgslTypes.ts'; -import { unify } from '../tgsl/conversion.ts'; +import { unify } from '../codegen/conversion.ts'; import { sub } from './operators.ts'; function correspondingBooleanVectorSchema(dataType: BaseData) { diff --git a/packages/typegpu/src/std/numeric.ts b/packages/typegpu/src/std/numeric.ts index ed60310628..3ea9bdab87 100644 --- a/packages/typegpu/src/std/numeric.ts +++ b/packages/typegpu/src/std/numeric.ts @@ -44,7 +44,7 @@ import { } from '../data/wgslTypes.ts'; import { SignatureNotSupportedError } from '../errors.ts'; import type { Infer } from '../shared/repr.ts'; -import { unify } from '../tgsl/conversion.ts'; +import { unify } from '../codegen/conversion.ts'; import type { ResolutionCtx } from '../types.ts'; import { mul, sub } from './operators.ts'; diff --git a/packages/typegpu/src/std/operators.ts b/packages/typegpu/src/std/operators.ts index 6052e25957..206e8ef1b1 100644 --- a/packages/typegpu/src/std/operators.ts +++ b/packages/typegpu/src/std/operators.ts @@ -20,7 +20,7 @@ import { type vecIToVecU, } from '../data/wgslTypes.ts'; import { SignatureNotSupportedError } from '../errors.ts'; -import { unify } from '../tgsl/conversion.ts'; +import { unify } from '../codegen/conversion.ts'; type NumVec = AnyNumericVecInstance; type Mat = AnyMatInstance; diff --git a/packages/typegpu/src/std/subgroup.ts b/packages/typegpu/src/std/subgroup.ts index f886490b07..8305f12f24 100644 --- a/packages/typegpu/src/std/subgroup.ts +++ b/packages/typegpu/src/std/subgroup.ts @@ -8,7 +8,7 @@ import type { AnyWgslData, v4u, } from '../data/wgslTypes.ts'; -import { unify } from '../tgsl/conversion.ts'; +import { unify } from '../codegen/conversion.ts'; interface IdentityNumOrVec { (e: number): number; diff --git a/packages/typegpu/src/types.ts b/packages/typegpu/src/types.ts index 1c92f8a43f..7e1c146ce9 100644 --- a/packages/typegpu/src/types.ts +++ b/packages/typegpu/src/types.ts @@ -47,7 +47,7 @@ import { import type { TgpuBindGroupLayout, TgpuLayoutEntry } from './tgpuBindGroupLayout.ts'; import type { WgslExtension } from './wgslExtensions.ts'; import type { Infer } from './shared/repr.ts'; -import { ShaderGenerator } from './tgsl/shaderGenerator.ts'; +import { ShaderGenerator } from './codegen/shaderGenerator.ts'; export type ResolvableObject = | SelfResolvable diff --git a/packages/typegpu/tests/tgsl/consoleLog.test.ts b/packages/typegpu/tests/tgsl/consoleLog.test.ts index c3fe5c7189..625a6c566b 100644 --- a/packages/typegpu/tests/tgsl/consoleLog.test.ts +++ b/packages/typegpu/tests/tgsl/consoleLog.test.ts @@ -2,7 +2,7 @@ import { beforeEach, describe, expect, vi } from 'vitest'; import { namespace } from '../../src/core/resolve/namespace.ts'; import tgpu, { d } from '../../src/index.js'; import { ResolutionCtxImpl } from '../../src/resolutionCtx.ts'; -import { deserializeAndStringify } from '../../src/tgsl/consoleLog/deserializers.ts'; +import { deserializeAndStringify } from '../../src/codegen/consoleLog/deserializers.ts'; import { CodegenState } from '../../src/types.ts'; import { it } from 'typegpu-testing-utility'; diff --git a/packages/typegpu/tests/tgsl/conversion.test.ts b/packages/typegpu/tests/tgsl/conversion.test.ts index ee72863801..c504b7acb2 100644 --- a/packages/typegpu/tests/tgsl/conversion.test.ts +++ b/packages/typegpu/tests/tgsl/conversion.test.ts @@ -6,14 +6,14 @@ import { convertStructValues, convertToCommonType, getBestConversion, -} from '../../src/tgsl/conversion.ts'; +} from '../../src/codegen/conversion.ts'; import { it } from 'typegpu-testing-utility'; import { INTERNAL_setCtx } from '../../src/execMode.ts'; import { CodegenState } from '../../src/types.ts'; import { UnknownData } from '../../src/data/dataTypes.ts'; import { ResolutionCtxImpl } from '../../src/resolutionCtx.ts'; import { namespace } from '../../src/core/resolve/namespace.ts'; -import wgslGenerator from '../../src/tgsl/wgslGenerator.ts'; +import wgslGenerator from '../../src/codegen/wgslGenerator.ts'; import { INTERNAL_createPtr } from '../../src/data/ptr.ts'; const ctx = new ResolutionCtxImpl({ diff --git a/packages/typegpu/tests/tgsl/generationHelpers.test.ts b/packages/typegpu/tests/tgsl/generationHelpers.test.ts index 9a51b702c3..a509ab9dba 100644 --- a/packages/typegpu/tests/tgsl/generationHelpers.test.ts +++ b/packages/typegpu/tests/tgsl/generationHelpers.test.ts @@ -4,9 +4,9 @@ import { mat2x2f, mat3x3f, mat4x4f } from '../../src/data/matrix.ts'; import { abstractFloat, abstractInt, bool, f16, f32, i32, u32 } from '../../src/data/numeric.ts'; import { struct } from '../../src/data/struct.ts'; import { vec2f, vec2i, vec3f, vec3i, vec4f, vec4h } from '../../src/data/vector.ts'; -import { coerceToSnippet, numericLiteralToSnippet } from '../../src/tgsl/generationHelpers.ts'; -import { accessIndex } from '../../src/tgsl/accessIndex.ts'; -import { accessProp } from '../../src/tgsl/accessProp.ts'; +import { coerceToSnippet, numericLiteralToSnippet } from '../../src/codegen/generationHelpers.ts'; +import { accessIndex } from '../../src/codegen/accessIndex.ts'; +import { accessProp } from '../../src/codegen/accessProp.ts'; import { UnknownData } from '../../src/data/dataTypes.ts'; import { snip } from '../../src/data/snippet.ts'; import { INTERNAL_setCtx } from '../../src/execMode.ts'; diff --git a/packages/typegpu/tests/tgsl/typeInference.test.ts b/packages/typegpu/tests/tgsl/typeInference.test.ts index 10c6c81726..4cd302eb6b 100644 --- a/packages/typegpu/tests/tgsl/typeInference.test.ts +++ b/packages/typegpu/tests/tgsl/typeInference.test.ts @@ -3,7 +3,7 @@ import tgpu, { d, std } from '../../src/index.js'; import { namespace } from '../../src/core/resolve/namespace.ts'; import { ResolutionCtxImpl } from '../../src/resolutionCtx.ts'; import { CodegenState } from '../../src/types.ts'; -import wgslGenerator from '../../src/tgsl/wgslGenerator.ts'; +import wgslGenerator from '../../src/codegen/wgslGenerator.ts'; describe('wgsl generator type inference', () => { let ctx: ResolutionCtxImpl; diff --git a/packages/typegpu/tests/tgsl/wgslGenerator.test.ts b/packages/typegpu/tests/tgsl/wgslGenerator.test.ts index 62c96fe428..098881c594 100644 --- a/packages/typegpu/tests/tgsl/wgslGenerator.test.ts +++ b/packages/typegpu/tests/tgsl/wgslGenerator.test.ts @@ -11,12 +11,12 @@ import { ResolutionCtxImpl } from '../../src/resolutionCtx.ts'; import { getMetaData } from '../../src/shared/meta.ts'; import { $internal } from '../../src/shared/symbols.ts'; import * as std from '../../src/std/index.ts'; -import wgslGenerator from '../../src/tgsl/wgslGenerator.ts'; +import wgslGenerator from '../../src/codegen/wgslGenerator.ts'; import { CodegenState } from '../../src/types.ts'; import { it } from 'typegpu-testing-utility'; -import { ArrayExpression } from '../../src/tgsl/generationHelpers.ts'; +import { ArrayExpression } from '../../src/codegen/generationHelpers.ts'; import { extractSnippetFromFn } from '../utils/parseResolved.ts'; -import { UnknownData } from '../../src/tgsl/shaderGenerator_members.ts'; +import { UnknownData } from '../../src/codegen/shaderGenerator_members.ts'; const { NodeTypeCatalog: NODE } = tinyest; diff --git a/packages/typegpu/tests/utils/parseResolved.ts b/packages/typegpu/tests/utils/parseResolved.ts index b798ff9f8c..40b04b9a4f 100644 --- a/packages/typegpu/tests/utils/parseResolved.ts +++ b/packages/typegpu/tests/utils/parseResolved.ts @@ -5,7 +5,7 @@ import type { UnknownData } from '../../src/data/dataTypes.ts'; import { ResolutionCtxImpl } from '../../src/resolutionCtx.ts'; import { provideCtx } from '../../src/execMode.ts'; import { getMetaData } from '../../src/shared/meta.ts'; -import wgslGenerator from '../../src/tgsl/wgslGenerator.ts'; +import wgslGenerator from '../../src/codegen/wgslGenerator.ts'; import { namespace } from '../../src/core/resolve/namespace.ts'; import type { Snippet } from '../../src/data/snippet.ts'; import { $internal } from '../../src/shared/symbols.ts';