remove block/buffer.count (#9406)

This commit is contained in:
Yun Hsiao Wu
2021-09-27 16:25:45 +08:00
committed by GitHub
parent 7a14686b01
commit fb3cd12061
2 changed files with 3 additions and 5 deletions
-2
View File
@@ -73,7 +73,6 @@ export declare namespace EffectAsset {
binding: number;
name: string;
members: Uniform[];
count: number;
stageFlags: ShaderStageFlags;
}
export interface ISamplerTextureInfo {
@@ -101,7 +100,6 @@ export declare namespace EffectAsset {
export interface IBufferInfo {
binding: number;
name: string;
count: number;
memoryAccess: MemoryAccess;
stageFlags: ShaderStageFlags;
}
+3 -3
View File
@@ -275,10 +275,10 @@ class ProgramLib {
for (let i = 0; i < tmpl.buffers.length; i++) {
const buffer = tmpl.buffers[i];
tmplInfo.bindings.push(new DescriptorSetLayoutBinding(buffer.binding,
DescriptorType.STORAGE_BUFFER, buffer.count, buffer.stageFlags));
DescriptorType.STORAGE_BUFFER, 1, buffer.stageFlags));
tmplInfo.shaderInfo.buffers.push(new UniformStorageBuffer(
SetIndex.MATERIAL, buffer.binding, buffer.name, buffer.count, buffer.memoryAccess,
));
SetIndex.MATERIAL, buffer.binding, buffer.name, 1, buffer.memoryAccess,
)); // effect compiler guarantees buffer count = 1
}
for (let i = 0; i < tmpl.images.length; i++) {
const image = tmpl.images[i];