webgpuHardwareTexture.d.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { HardwareTextureWrapper } from "../../Materials/Textures/hardwareTextureWrapper";
  2. import type { Nullable } from "../../types";
  3. /** @internal */
  4. export declare class WebGPUHardwareTexture implements HardwareTextureWrapper {
  5. /**
  6. * Cache of RenderPassDescriptor and BindGroup used when generating mipmaps (see WebGPUTextureHelper.generateMipmaps)
  7. * @internal
  8. */
  9. _mipmapGenRenderPassDescr: GPURenderPassDescriptor[][];
  10. /** @internal */
  11. _mipmapGenBindGroup: GPUBindGroup[][];
  12. /**
  13. * Cache for the invertYPreMultiplyAlpha function (see WebGPUTextureHelper)
  14. * @internal
  15. */
  16. _copyInvertYTempTexture?: GPUTexture;
  17. /** @internal */
  18. _copyInvertYRenderPassDescr: GPURenderPassDescriptor;
  19. /** @internal */
  20. _copyInvertYBindGroup: GPUBindGroup;
  21. /** @internal */
  22. _copyInvertYBindGroupWithOfst: GPUBindGroup;
  23. private _webgpuTexture;
  24. private _webgpuMSAATexture;
  25. get underlyingResource(): Nullable<GPUTexture>;
  26. getMSAATexture(index?: number): Nullable<GPUTexture>;
  27. setMSAATexture(texture: GPUTexture, index?: number): void;
  28. releaseMSAATexture(): void;
  29. view: Nullable<GPUTextureView>;
  30. viewForWriting: Nullable<GPUTextureView>;
  31. format: GPUTextureFormat;
  32. textureUsages: number;
  33. textureAdditionalUsages: number;
  34. constructor(existingTexture?: Nullable<GPUTexture>);
  35. set(hardwareTexture: GPUTexture): void;
  36. setUsage(_textureSource: number, generateMipMaps: boolean, is2DArray: boolean, isCube: boolean, is3D: boolean, width: number, height: number, depth: number): void;
  37. createView(descriptor?: GPUTextureViewDescriptor, createViewForWriting?: boolean): void;
  38. reset(): void;
  39. release(): void;
  40. }