Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Sep 4, 2024
1 parent 2d521b2 commit 558ccc0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion modules/core/src/adapter/canvas-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export abstract class CanvasContext {
abstract readonly handle: unknown;
readonly id: string;


readonly props: Required<CanvasContextProps>;
readonly canvas: HTMLCanvasElement | OffscreenCanvas;
readonly htmlCanvas?: HTMLCanvasElement;
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/adapter/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export abstract class Device {
/** type of this device */
abstract readonly type: 'webgl' | 'webgpu' | 'unknown';
abstract readonly handle: unknown;

/** A copy of the device props */
readonly props: Required<DeviceProps>;
/** Available for the application to store data on the device */
Expand Down
6 changes: 4 additions & 2 deletions modules/core/src/adapter/resources/render-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import type {UniformValue} from '../types/uniforms';
import type {PrimitiveTopology, RenderPipelineParameters} from '../types/parameters';
import type {ShaderLayout, Binding} from '../types/shader-layout';
import type {BufferLayout} from '../types/buffer-layout';
import type {ColorTextureFormat, DepthStencilTextureFormat} from '@luma.gl/core/gpu-type-utils/texture-formats';
import type {
ColorTextureFormat,
DepthStencilTextureFormat
} from '@luma.gl/core/gpu-type-utils/texture-formats';
import type {Shader} from './shader';
import type {RenderPass} from './render-pass';
import {Resource, ResourceProps} from './resource';
import {VertexArray} from './vertex-array';
import {TransformFeedback} from './transform-feedback';


export type RenderPipelineProps = ResourceProps & {
// Shaders and shader layout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ export class WebGPURenderPipeline extends RenderPipeline {
};

// Set depth format if required, defaulting to the preferred depth format
const depthFormat =
this.props.depthStencilAttachmentFormat || this.device.preferredDepthFormat;

const depthFormat = this.props.depthStencilAttachmentFormat || this.device.preferredDepthFormat;

if (this.props.parameters.depthWriteEnabled) {
descriptor.depthStencil = {
format: getWebGPUTextureFormat(depthFormat)
Expand Down
2 changes: 1 addition & 1 deletion modules/webgpu/src/adapter/webgpu-canvas-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {WebGPUTexture} from './resources/webgpu-texture';
export class WebGPUCanvasContext extends CanvasContext {
readonly device: WebGPUDevice;
readonly handle: GPUCanvasContext;

private depthStencilAttachment: WebGPUTexture | null = null;

get [Symbol.toStringTag](): string {
Expand Down

0 comments on commit 558ccc0

Please sign in to comment.