This commit is contained in:
jerrywwl
2019-01-10 15:17:03 +08:00
2 changed files with 6 additions and 3 deletions
+6 -1
View File
@@ -13,7 +13,7 @@ import { GFXRenderPass } from '../../gfx/render-pass';
import { GFXSampler } from '../../gfx/sampler';
import { GFXShader } from '../../gfx/shader';
import { GFXTextureView } from '../../gfx/texture-view';
import { RenderPassStage } from '../../pipeline/render-pipeline';
import { RenderPassStage, UBOGlobal, UBOLocal } from '../../pipeline/render-pipeline';
export interface IPassInfoFull extends IPassInfo {
// generated part
@@ -53,6 +53,8 @@ const _type2default = {
[GFXType.MAT4]: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
};
const builtinRE = new RegExp(UBOGlobal.BLOCK.name + '|' + UBOLocal.BLOCK.name);
const btMask = 0xf0000000; // 4 bits, 16 slots
const typeMask = 0x0fc00000; // 6 bits, 64 slots
const bindingMask = 0x003ff800; // 11 bits, 2048 slots
@@ -114,6 +116,9 @@ export class Pass {
this.createPipelineState(info);
for (const u of info.blocks) {
if (builtinRE.test(u.name)) {
continue;
}
// create gfx buffer resource
const buffer = device.createBuffer({
memUsage: GFXMemoryUsageBit.HOST | GFXMemoryUsageBit.DEVICE,
-2
View File
@@ -23,7 +23,6 @@ export default class Model {
private _scene: RenderScene | null;
private _id: number;
private _enable: boolean;
private _type: string;
private _poolID: number;
private _isEnable: boolean;
@@ -48,7 +47,6 @@ export default class Model {
constructor () {
this._scene = null;
this._id = 0;
this._enable = false;
this._type = 'default';
this._poolID = -1;