Skip to content

Commit

Permalink
chore: Update to OpenJS recommended license, SPDX identifiers (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Feb 28, 2024
1 parent 1bd3342 commit c6c43df
Show file tree
Hide file tree
Showing 305 changed files with 892 additions and 393 deletions.
5 changes: 4 additions & 1 deletion examples/portable/two-cubes/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Buffer, glsl} from '@luma.gl/core';
import {AnimationLoopTemplate, AnimationProps, Model, CubeGeometry} from '@luma.gl/engine';
import '@luma.gl/webgpu';
Expand Down
5 changes: 4 additions & 1 deletion examples/tutorials/hello-cube/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {glsl, UniformStore, NumberArray, ShaderUniformType, loadImage} from '@luma.gl/core';
import {AnimationLoopTemplate, AnimationProps, Model, CubeGeometry} from '@luma.gl/engine';
import {Matrix4} from '@math.gl/core';
Expand Down
3 changes: 2 additions & 1 deletion examples/tutorials/shader-hooks/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Buffer, NumberArray, UniformStore} from '@luma.gl/core';
Expand Down
5 changes: 4 additions & 1 deletion examples/tutorials/shader-modules/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Buffer, NumberArray} from '@luma.gl/core';
import {AnimationLoopTemplate, AnimationProps, Model, _ShaderInputs} from '@luma.gl/engine';
import {ShaderModule} from '@luma.gl/shadertools';
Expand Down
6 changes: 5 additions & 1 deletion modules/constants/src/webgl-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,13 @@ enum GLEnum {
// Queries

CURRENT_QUERY = 0x8865,
/** Returns a GLuint containing the query result. */
QUERY_RESULT = 0x8866,
/** Whether query result is available. */
QUERY_RESULT_AVAILABLE = 0x8867,
/** Occlusion query (if drawing passed depth test) */
ANY_SAMPLES_PASSED = 0x8c2f,
/** Occlusion query less accurate/faster version */
ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8d6a,

// Draw buffers
Expand Down Expand Up @@ -964,7 +968,7 @@ enum GLEnum {
TIME_ELAPSED_EXT = 0x88bf,
/** The current time. */
TIMESTAMP_EXT = 0x8e28,
/** A Boolean indicating whether or not the GPU performed any disjoint operation. */
/** A Boolean indicating whether or not the GPU performed any disjoint operation (lost context) */
GPU_DISJOINT_EXT = 0x8fbb,

// KHR_parallel_shader_compile https://registry.khronos.org/webgl/extensions/KHR_parallel_shader_compile
Expand Down
6 changes: 5 additions & 1 deletion modules/core-tests/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
// intentionally empty
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// intentionally empty, this is a test-only module
5 changes: 4 additions & 1 deletion modules/core-tests/test/adapter/canvas-context.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {getWebGLTestDevices} from '@luma.gl/test-utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {getTestDevices} from '@luma.gl/test-utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {GL} from '@luma.gl/constants';
import {getTestDevices} from '@luma.gl/test-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test, {Test} from 'tape-promise/tape';
import {webglDevice} from '@luma.gl/test-utils';

Expand Down
5 changes: 4 additions & 1 deletion modules/core-tests/test/adapter/device.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {getWebGLTestDevices, getTestDevices} from '@luma.gl/test-utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {parseShaderCompilerLog} from '@luma.gl/webgl/adapter/helpers/parse-shader-compiler-log';

Expand Down
3 changes: 2 additions & 1 deletion modules/core-tests/test/adapter/resources/buffer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Buffer, TypedArray} from '@luma.gl/core';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test, {Test} from 'tape-promise/tape';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

/*
Expand Down
4 changes: 4 additions & 0 deletions modules/core-tests/test/adapter/resources/sampler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test, {Test} from 'tape-promise/tape';
import {webglDevice} from '@luma.gl/test-utils';

Expand Down
3 changes: 2 additions & 1 deletion modules/core-tests/test/adapter/resources/shader.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
Expand Down
4 changes: 4 additions & 0 deletions modules/core-tests/test/adapter/texture-formats.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {getTestDevices} from '@luma.gl/test-utils';

Expand Down
5 changes: 4 additions & 1 deletion modules/core-tests/test/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// Note that we do two test runs on luma.gl, with and without headless-gl
// This file imports tests that should run *with* headless-gl included

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {log} from '../../utils/log';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/adapter/canvas-context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {isBrowser} from '@probe.gl/env';
import type {Device} from './device';
import type {Framebuffer} from './resources/framebuffer';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/adapter/device.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {VERSION} from '../init';
import {StatsManager, lumaStats} from '../utils/stats-manager';
import {log} from '../utils/log';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/adapter/resources/buffer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {Device} from '../device';
import {Resource, ResourceProps} from './resource';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/adapter/resources/command-buffer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Device} from '../device';
import {Resource, ResourceProps} from './resource';

Expand Down
15 changes: 4 additions & 11 deletions modules/core/src/adapter/resources/command-encoder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Device} from '../device';
import {Resource, ResourceProps} from './resource';
import {Buffer} from './buffer';
Expand Down Expand Up @@ -159,14 +162,4 @@ export abstract class CommandEncoder extends Resource<CommandEncoderProps> {
popDebugGroup() {}

insertDebugMarker(markerLabel: string): void {}

// writeTimestamp(querySet: Query, queryIndex: number): void;

// resolveQuerySet(options: {
// querySet: GPUQuerySet,
// firstQuery: number,
// queryCount: number,
// destination: Buffer,
// destinationOffset?: number;
// }): void;
}
12 changes: 6 additions & 6 deletions modules/core/src/adapter/resources/compute-pass.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Resource, ResourceProps} from './resource';
import {ComputePipeline} from './compute-pipeline';
import {Buffer} from './buffer';
import type {Device} from '../device';
import {Buffer} from './buffer';

export type ComputePassProps = ResourceProps & {};

Expand All @@ -15,7 +19,7 @@ export abstract class ComputePass extends Resource<ComputePassProps> {
}

constructor(device: Device, props: ComputePassProps) {
super(device, props, Resource.defaultProps);
super(device, props, ComputePass.defaultProps);
}

abstract override destroy(): void;
Expand Down Expand Up @@ -45,8 +49,4 @@ export abstract class ComputePass extends Resource<ComputePassProps> {
abstract pushDebugGroup(groupLabel: string): void;
abstract popDebugGroup(): void;
abstract insertDebugMarker(markerLabel: string): void;

// writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;
// beginPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;
// endPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;
}
5 changes: 4 additions & 1 deletion modules/core/src/adapter/resources/compute-pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Resource, ResourceProps} from './resource';
import {BindingDeclaration} from '../types/shader-layout';
import type {Device} from '../device';
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/adapter/resources/external-texture.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {Device} from '../device';
import {Resource, ResourceProps} from './resource';

Expand Down
3 changes: 2 additions & 1 deletion modules/core/src/adapter/resources/framebuffer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {
Expand Down
60 changes: 26 additions & 34 deletions modules/core/src/adapter/resources/render-pass.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {Device} from '../device';
import type {RenderPassParameters} from '../types/parameters';
// import {Binding} from '../types/shader-layout';
import {Resource, ResourceProps} from './resource';
// import {Buffer} from './buffer';
// import {RenderPipeline} from './render-pipeline';
// import {CommandEncoder} from './command-encoder';
import {Framebuffer} from './framebuffer';
import {NumberArray} from '../..';

Expand Down Expand Up @@ -74,43 +74,35 @@ export abstract class RenderPass extends Resource<RenderPassProps> {
abstract popDebugGroup(): void;
abstract insertDebugMarker(markerLabel: string): void;

// writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;

// beginOcclusionQuery(queryIndex: number): void;
// endOcclusionQuery(): void;

// executeBundles(bundles: Iterable<GPURenderBundle>): void;

// In WebGPU the following methods are on the renderpass.
// TODO - In WebGPU the following methods are on the renderpass.
// luma.gl keeps them on the pipeline for now
// setPipeline(pipeline: RenderPipeline): void {}

/*
setPipeline(pipeline: RenderPipeline): void {}
setIndexBuffer(
buffer: Buffer,
indexFormat: 'uint16' | 'uint32',
offset?: number,
size?: number
): void {}
// setIndexBuffer(
// buffer: Buffer,
// indexFormat: 'uint16' | 'uint32',
// offset?: number,
// size?: number
// ): void {}

abstract setVertexBuffer(slot: number, buffer: Buffer, offset: number): void;
// abstract setVertexBuffer(slot: number, buffer: Buffer, offset: number): void;

abstract setBindings(bindings: Record<string, Binding>): void;
// abstract setBindings(bindings: Record<string, Binding>): void;

abstract setParameters(parameters: RenderPassParameters);
// abstract setParameters(parameters: RenderPassParameters);

draw(options: {
vertexCount?: number; // Either vertexCount or indexCount must be provided
indexCount?: number; // Activates indexed drawing (call setIndexBuffer())
instanceCount?: number; //
firstVertex?: number;
firstIndex?: number; // requires device.features.has('indirect-first-instance')?
firstInstance?: number;
baseVertex?: number;
}): void {}
// draw(options: {
// vertexCount?: number; // Either vertexCount or indexCount must be provided
// indexCount?: number; // Activates indexed drawing (call setIndexBuffer())
// instanceCount?: number; //
// firstVertex?: number;
// firstIndex?: number; // requires device.features.has('indirect-first-instance')?
// firstInstance?: number;
// baseVertex?: number;
// }): void {}

drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
*/
// drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
// drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
}
5 changes: 4 additions & 1 deletion modules/core/src/adapter/resources/render-pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// luma.gl, MIT license
// luma.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {Device} from '../device';
import type {UniformValue} from '../types/types';
import type {PrimitiveTopology, RenderPipelineParameters} from '../types/parameters';
Expand Down
Loading

0 comments on commit c6c43df

Please sign in to comment.