/
queue.ts
47 lines (37 loc) · 1.04 KB
/
queue.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* @category gfx
*/
import { GFXCommandBuffer } from './command-buffer';
import { GFXObject, GFXObjectType, GFXQueueType } from './define';
import { GFXDevice } from './device';
export interface IGFXQueueInfo {
type: GFXQueueType;
}
/**
* @en GFX Queue.
* @zh GFX 队列。
*/
export abstract class GFXQueue extends GFXObject {
/**
* @en Get current type.
* @zh 队列类型。
*/
public get type (): number {
return this._type;
}
protected _device: GFXDevice;
protected _type: GFXQueueType = GFXQueueType.GRAPHICS;
constructor (device: GFXDevice) {
super(GFXObjectType.QUEUE);
this._device = device;
}
public abstract initialize (info: IGFXQueueInfo): boolean;
public abstract destroy (): void;
/**
* @en Submit command buffers.
* @zh 提交命令缓冲数组。
* @param cmdBuffs The command buffers to be submitted.
* @param fence The syncing fence.
*/
public abstract submit (cmdBuffs: GFXCommandBuffer[], fence?: any): void;
}