-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
queue.ts
72 lines (62 loc) · 1.29 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* @category gfx
*/
import { GFXCommandBuffer } from './command-buffer';
import { GFXObject, GFXObjectType, GFXQueueType } from './define';
import { GFXDevice } from './device';
/**
* @zh
* GFX队列描述信息。
*/
export interface IGFXQueueInfo {
type: GFXQueueType;
}
/**
* @zh
* GFX队列。
*/
export abstract class GFXQueue extends GFXObject {
/**
* @zh
* 队列类型。
*/
public get type (): number {
return this._type;
}
/**
* @zh
* GFX设备。
*/
protected _device: GFXDevice;
/**
* @zh
* 队列类型。
*/
protected _type: GFXQueueType = GFXQueueType.GRAPHICS;
/**
* 构造函数。
* @param device GFX设备。
*/
constructor (device: GFXDevice) {
super(GFXObjectType.QUEUE);
this._device = device;
}
/**
* @zh
* 初始化函数。
* @param info GFX队列描述信息。
*/
public abstract initialize (info: IGFXQueueInfo): boolean;
/**
* @zh
* 销毁函数。
*/
public abstract destroy ();
/**
* @zh
* 提交命令缓冲数组。
* @param cmdBuffs GFX命令缓冲数组。
* @param fence GFX栅栏。
*/
public abstract submit (cmdBuffs: GFXCommandBuffer[], fence?);
}