Implement internal storage for buffer usage and buffer binding type

In the timestamp internal pipeline, the ResolveQuery buffer cannnot be
binded as Storage buffer in binding group layout due to it has not
Storage usage.
Add InternalStorageBuffer for buffer usage and
InternalStorageBufferBinding for buffer binding type, make the
QueryResolve buffer implicitly get InternalStorageBuffer and only
compatible with InternalStorageBufferBinding in BGL, not Storage buffer
binding type.

Bug: dawn:797
Change-Id: I286339e703e26d3786c706ded03f850ca17355fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54400
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
Li Hao
2021-06-16 14:33:27 +00:00
committed by Dawn LUCI CQ
parent 46ed96336a
commit b936d23364
21 changed files with 79 additions and 21 deletions

View File

@@ -544,8 +544,7 @@ TEST_F(BindGroupValidationTest, BufferUsageReadonlySSBO) {
}
// Check that a resolve buffer with internal storge usage cannot be used as SSBO
// TODO(hao.x.li@intel.com): Disable until internal storage usage is implemented
TEST_F(BindGroupValidationTest, DISABLED_BufferUsageQueryResolve) {
TEST_F(BindGroupValidationTest, BufferUsageQueryResolve) {
wgpu::BindGroupLayout layout = utils::MakeBindGroupLayout(
device, {{0, wgpu::ShaderStage::Fragment, wgpu::BufferBindingType::Storage}});