profile
viewpoint

haoxli/zjs-demos 1

Sample applications and demos for Zephyr.js

haoxli/cts 0

WebGPU Conformance Test Suite

haoxli/demo-express 0

A demo application to showcase Crosswalk's features and APIs

haoxli/deno 0

A secure TypeScript runtime on V8

haoxli/gpuweb 0

Where the GPU for the Web work happens!

issue commentgpuweb/gpuweb

Query API: How to understand the execution time of the Dispatch command

The writeTimestamp can write usful results without barriers for render pass, maybe we just need do that for non-pass and compute pass.

haoxli

comment created time in 3 days

issue openedgpuweb/gpuweb

Query API: How to understand the execution time of the Dispatch command

When using timestamp query to measure the execution time of compute shader on D3D12 backend, we find it return different results on Intel and Nvidia devices. On Intel, the timestamp is written into queries when the Dispatch command is completed (the compute shader is finished by GPU), but on Nvidia, it's written when the command is dispatched (the computer shader is not finished yet), so we need to add resource barrier before writing timestamp to ensure that the result is valid.

The question is what the execution time of Dispatch command should be, and I'm not sure if we need to insert the resource barrier implicitly?

created time in 4 days

Pull request review commentgpuweb/cts

Add validation for index access

+export const description = `+indexed draws validation tests.+`;++import { params, poptions, pbool } from '../../../../../common/framework/params_builder.js';+import { makeTestGroup } from '../../../../../common/framework/test_group.js';++import { ValidationTest } from './../../validation_test.js';++class F extends ValidationTest {+  createIndexBuffer(): GPUBuffer {+    const indexArray = new Uint32Array([0, 1, 2, 3, 1, 2]);++    const [indexBuffer, indexMapping] = this.device.createBufferMapped({+      size: indexArray.byteLength,+      usage: GPUBufferUsage.INDEX,+    });+    new Uint32Array(indexMapping).set(indexArray);+    indexBuffer.unmap();++    return indexBuffer;+  }++  createRenderPipeline(): GPURenderPipeline {+    const vertexModule = this.makeShaderModule('vertex', {+      glsl: `+        #version 450+        void main() {+          gl_Position = vec4(0.0, 0.0, 0.0, 1.0);+        }+      `,+    });++    const fragmentModule = this.makeShaderModule('fragment', {+      glsl: `+        #version 450+        layout(location = 0) out vec4 fragColor;+        void main() {+            fragColor = vec4(0.0, 1.0, 0.0, 1.0);+        }+      `,+    });++    return this.device.createRenderPipeline({+      layout: this.device.createPipelineLayout({ bindGroupLayouts: [] }),+      vertexStage: { module: vertexModule, entryPoint: 'main' },+      fragmentStage: { module: fragmentModule, entryPoint: 'main' },+      primitiveTopology: 'triangle-strip',+      colorStates: [{ format: 'rgba8unorm' }],+    });+  }++  beginRenderPass(encoder: GPUCommandEncoder) {+    const colorAttachment = this.device.createTexture({+      format: 'rgba8unorm',+      size: { width: 1, height: 1, depth: 1 },+      usage: GPUTextureUsage.OUTPUT_ATTACHMENT,+    });++    return encoder.beginRenderPass({+      colorAttachments: [

The colorAttachments is required in GPURenderPassDescriptor. It will throw error if no attachment is set.

haoxli

comment created time in a month

push eventhaoxli/cts

Li, Hao

commit sha 24164f58dd6b27a4326d6dc28332cfc50e836ab0

Make parameterized tests - Remove vertex buffer - Add params and more tests

view details

push time in a month

issue commentgpuweb/gpuweb

Investigation: Query API

I mean when calling resolveQuerySet(querySet, firstQuery, queryCount, destination, destinationOffset), the queries in the rang of [firstQuery, firstQuery+queryCount] must be written. For example we have a query set containing 4 queries with the type of timestamp-query, but we only write timestamp to the first three queries. If we resolve all 4 queries, error will be thrown becuase the fourth one isn't used which status is unavailable.

And on Vulkan, there is no API to get the query state in query set. It just says each query in query set has a state that is either unavailable or available, and also has state to store the numerical results, the state and query value only can be changed by BeginQuery/EndQuery/WriteTimestamp operations. So I don't think we can initialize the state and value in advance.

haoxli

comment created time in a month

PR closed gpuweb/cts

Index format tests

Add test cases for testing drawIndexed, IndexFormat, Primitive restart

+227 -0

2 comments

1 changed file

haoxli

pr closed time in a month

pull request commentgpuweb/cts

Index format tests

There are too many combinations for the check points, I will submit separately, so close this one.

haoxli

comment created time in a month

push eventhaoxli/cts

Li, Hao

commit sha 524181bab7ffc5a5904ef152d72c644dc2c2af7f

Add validation for index access Validate index access out of bounds in drawIndexed and drawIndexedIndirect.

view details

push time in a month

PR opened gpuweb/cts

Add validation for index access

Validate index access out of bounds in drawIndexed and drawIndexedIndirect.

+167 -0

0 comment

1 changed file

pr created time in a month

create barnchhaoxli/cts

branch : index_access_validation

created branch time in a month

push eventhaoxli/cts

Kai Ninomiya

commit sha 0b380062012789052ed123b78422b87ab1675f54

Don't use variants in reftests (#185) Turns out WPT doesn't support test variants in reftests.

view details

Kai Ninomiya

commit sha ca1351128891b2da026d82edc412911256a3ec90

only checkForDuplicateCases during crawl(); slightly speed up comparePublicParamsPaths (#186) * only checkForDuplicateCases during crawl(); slightly speed up comparePublicParamsPaths * use Set * un-delete error message * expand tests, go back to n^2 (instead of Set) to pass tests * more testing, rename method * nit

view details

Kai Ninomiya

commit sha deebbfc29bc9845fca5b7a94e92634ca4065c2d1

gen_wpt_cts_html: Detect too-long variant names, handle expectation input more robustly (#189) * Detect too-long variant names * gen_wpt_cts_html: Allow unmatched and duplicate expectation lines

view details

Kai Ninomiya

commit sha d5301f8bbe3b3da2c2f7124f85a4df67b24c979a

Merge branch 'master' into glsl-dependent

view details

Kai Ninomiya

commit sha 139a8fa4f9e4371a6474376d4867dac20a6e9e38

fix small typo (#192)

view details

Kai Ninomiya

commit sha 0838dce742ee8254817d2ce1c216d1a21e00e528

expectSingleColor: copy mipSize instead of base size (#190)

view details

Kai Ninomiya

commit sha d8d0ca524c80a0086ab70e155b80589a6be2b6f6

Reduce logging verbosity (#188) * Add additional log severity levels; reduce log verbosity by default * Reduce verbosity of checkBuffer* errors * dedup identical log entries * revise * oops

view details

Kai Ninomiya

commit sha 550dfb76f2b4a363f46c02691c3d4480aae28ed1

Merge branch 'master' into glsl-dependent

view details

Kai Ninomiya

commit sha 98cfd9577043eecd53a63bf8964615e41c15bb54

standalone runner: implement collapsing, show relative names (#187) * standalone: add rudimentary collapsing, start with files collapsed, make buttons smaller Unfortunately, still can't lazily create DOM subtrees, so page loading is still very slow. It's not easy to do so, because the "run subtree" button (as implemented) depends on the tree already being processed. (However it could be done without generating the actual DOM.) This page needs more serious overhauling. * revise

view details

Kai Ninomiya

commit sha 53eb03a52c6244922bf9301e04f973f98b4bb4ba

Add demo test suite, for manually testing test runners (#194)

view details

Kai Ninomiya

commit sha c69c07b61f777fe278a035601e7d5ffe8e3babe2

Add/convert some jsdocs (#195)

view details

Kai Ninomiya

commit sha 6f811a0ef159885a2cea2394b29d6f4ab9016223

standalone: dissolveLevelBoundaries (#193) * standalone: dissolveLevelBoundaries Reduces node count from 6460 to 4171, making things much more navigable. * Always set leaf readableRelativeName; tweak formatting * swap "Run" icons to match formatting on subtree names * readability styling tweaks

view details

Kai Ninomiya

commit sha d12700b41d2245458ed9b09615dc152459f59342

Merge branch 'master' into glsl-dependent

view details

Kai Ninomiya

commit sha 1fd0e259a905818c1c20a27d3a139747dd95135a

Add IDL tests for flags interfaces (#197) * Add IDL tests for flags interfaces * disable no-undef, not useful with typescript

view details

Kai Ninomiya

commit sha 26b45b24eb9874791290d1466f91e7c81486f273

Replace usages of constants.ts with `as const` (#196) * fix warnings * Replace usages of constants.ts with `as const`

view details

Kai Ninomiya

commit sha ff0c7593e5474f0fc217786b465a1c76d46a7899

Merge branch 'master' into glsl-dependent

view details

Kai Ninomiya

commit sha 6c03fde81547f7f5342cdd6a58dcef32ba2d26c5

[glsl-dependent] Replace some usages of constants.ts with `as const` (#198) * [glsl-dependent] Replace some usages of constants.ts with `as const` * use "as GPUVertexFormat"

view details

Austin Eng

commit sha 82cccf6372abad367d36a6744b7a76cf153d57a1

Fix cross-device fence signal tests (#202) Fixes #201. The test originally checked for the validation error on the wrong device.

view details

Austin Eng

commit sha b996368ae14dced0d72a3ab569ed94255417f836

Add missing storageTextureFormat to BGL descriptor (#203) * Add missing storageTextureFormat to BGL descriptor Fixes #200. createPipelineLayout:visibility_and_dynamic_offsets tests were incorrectly missing the storageTextureFormat for storage texture binding types. * use info.resource === storageTex

view details

Austin Eng

commit sha e9a6d9600d2b1cca1403a6238ee2afa8f0a62bde

Update check_two_attributes_overlapping to permit overlapping (#206) Fixes #204. Overlapping and aliased vertex attributes is allowed and works correctly on all WebGPU backends. There should be an operation test to check this in the future.

view details

push time in a month

create barnchhaoxli/cts

branch : main

created branch time in a month

push eventhaoxli/cts

Kai Ninomiya

commit sha deebbfc29bc9845fca5b7a94e92634ca4065c2d1

gen_wpt_cts_html: Detect too-long variant names, handle expectation input more robustly (#189) * Detect too-long variant names * gen_wpt_cts_html: Allow unmatched and duplicate expectation lines

view details

Kai Ninomiya

commit sha 0838dce742ee8254817d2ce1c216d1a21e00e528

expectSingleColor: copy mipSize instead of base size (#190)

view details

Kai Ninomiya

commit sha d8d0ca524c80a0086ab70e155b80589a6be2b6f6

Reduce logging verbosity (#188) * Add additional log severity levels; reduce log verbosity by default * Reduce verbosity of checkBuffer* errors * dedup identical log entries * revise * oops

view details

Kai Ninomiya

commit sha 98cfd9577043eecd53a63bf8964615e41c15bb54

standalone runner: implement collapsing, show relative names (#187) * standalone: add rudimentary collapsing, start with files collapsed, make buttons smaller Unfortunately, still can't lazily create DOM subtrees, so page loading is still very slow. It's not easy to do so, because the "run subtree" button (as implemented) depends on the tree already being processed. (However it could be done without generating the actual DOM.) This page needs more serious overhauling. * revise

view details

Kai Ninomiya

commit sha 53eb03a52c6244922bf9301e04f973f98b4bb4ba

Add demo test suite, for manually testing test runners (#194)

view details

Kai Ninomiya

commit sha c69c07b61f777fe278a035601e7d5ffe8e3babe2

Add/convert some jsdocs (#195)

view details

Kai Ninomiya

commit sha 6f811a0ef159885a2cea2394b29d6f4ab9016223

standalone: dissolveLevelBoundaries (#193) * standalone: dissolveLevelBoundaries Reduces node count from 6460 to 4171, making things much more navigable. * Always set leaf readableRelativeName; tweak formatting * swap "Run" icons to match formatting on subtree names * readability styling tweaks

view details

Kai Ninomiya

commit sha 1fd0e259a905818c1c20a27d3a139747dd95135a

Add IDL tests for flags interfaces (#197) * Add IDL tests for flags interfaces * disable no-undef, not useful with typescript

view details

Kai Ninomiya

commit sha 26b45b24eb9874791290d1466f91e7c81486f273

Replace usages of constants.ts with `as const` (#196) * fix warnings * Replace usages of constants.ts with `as const`

view details

Austin Eng

commit sha 163676cc9c9a187b1382f8307c7798e0e9146e17

Expect GPUOutOfMemoryError in map_oom tests (#205) * Expect GPUOutOfMemoryError in map_oom tests Fixes #199. Also adds a helper to asynchronously expect errors. * OperationError for mapping after out-of-memory; expectGPUError

view details

Kai Ninomiya

commit sha 2527c8f2a0fe0f3e886f678f9dc9d6b24632c2e0

fix idl_test to import Fixture instead of UnitTest (#207)

view details

Kai Ninomiya

commit sha fd88cc69b6f91512729dfc4a5a43db52c85b82bc

Switch to npm instead of yarn, and update deps (#209) Using npm slightly reduces unnecessary dependencies of the project.

view details

Kai Ninomiya

commit sha 55bb9cef7c84f88b7573cf6a0992cd05cc41ffa5

Lint for imports from wrong directories (#208) * Lint for imports from wrong directories * Apply suggestions from code review Co-authored-by: Austin Eng <2154796+austinEng@users.noreply.github.com> Co-authored-by: Austin Eng <2154796+austinEng@users.noreply.github.com>

view details

Kai Ninomiya

commit sha 21f8f997c1db17e2daa6d0c9e8794a5c3216f373

Remove dependency on constants.ts (#211)

view details

Kai Ninomiya

commit sha bf4d1843e46817d5693022c11354e44a3121f135

Clean up stale babel plugin deps (#215)

view details

Kai Ninomiya

commit sha ad7831fcb7879e2b665b14d1bc6c4d55b2c64029

Use Babel instead of copy to generate out-wpt/ (#212) * Remove dependency on constants.ts * Don't export LICENSE to WPT export Our license is the same as WPT's license. Excluding this license from the export reduces the apparent complexity of WPT's licensing (by removing a redundant extra license file). Update CONTRIBUTING.md to explain this. * Use Babel instead of copy to generate out-wpt/ This lets us use different Babel options for out-wpt/. Also tweak Grunt targets. * revise * retainLines, mkdir in gen_*

view details

Kai Ninomiya

commit sha 8ffa354463a814bc00e635b4fb740c3c624c2e68

Autoformat out-wpt/ using prettier (#216)

view details

Kai Ninomiya

commit sha afcbdc632cfca398ba7c5837a402b2773772bd64

Fix log printing on Safari/Firefox (#214) Thought I tested this, but error.stack does not contain the error message on Safari and Firefox. So include it explicitly when printing.

view details

Kai Ninomiya

commit sha 7c44fd7b6cc7061c7fb7d0537e0fe13a4f550e5a

Make autoformat-out-wpt quieter (#217)

view details

Kai Ninomiya

commit sha 327b0a89f364891429e9db3757d1abddbebf3bb2

Apply suggestion from #210 (#218) https://github.com/gpuweb/cts/pull/210#pullrequestreview-427927271

view details

push time in a month

issue commentgpuweb/gpuweb

Investigation: Query API

Oh, sorry, I did not quote the correct sentence, it should be

If VK_QUERY_RESULT_WAIT_BIT is set, the implementation will wait for each query’s status to be in the available state before retrieving the numerical results for that query. If the query does not become available in a finite amount of time (e.g. due to not issuing a query since the last reset), a VK_ERROR_DEVICE_LOST error may occur.

haoxli

comment created time in a month

issue commentgpuweb/gpuweb

Investigation: Query API

There is one point I ignored when resolving query set. In Vulkan spec, it requires that the queries in query set need to be availabe state for resolving, which need to perform a query operation (begin/end query, write timestamp) to change the status to available when the query finishes.

If neither of VK_QUERY_RESULT_WAIT_BIT and VK_QUERY_RESULT_WITH_AVAILABILITY_BIT are set, results are only written out for queries in the available state.

So we need tracking the state of each queries in query set and checking the query state when resolving.

haoxli

comment created time in a month

Pull request review commentgpuweb/gpuweb

Add time query on GPUCommandBuffer

 GPUCommandBuffer includes GPUObjectBase;  <script type=idl> dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {+    boolean executionTimeEnabled = false;

Remove the issue and clear that the value of execution time is fetched when GPUQueue.submit().

haoxli

comment created time in a month

push eventhaoxli/gpuweb

Li Hao

commit sha 2afa30bf82676bdd91f7d4e7607c6713f2e79dc7

Address the issue about promise resolve

view details

push time in a month

push eventhaoxli/gpuweb

Li Hao

commit sha 40cb7605337a0ca7165b99c1a1f32d74cf7c1b41

Add issue for promise resolve

view details

push time in 2 months

Pull request review commentgpuweb/gpuweb

Add time query on GPUCommandBuffer

 GPUCommandBuffer includes GPUObjectBase;  <script type=idl> dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {+    boolean executionTimeEnabled = false;

OK, I will add an Issue for it now. I consider that maybe we also can remove the promise if we resolve the value from GPUQueue.submit() because we have read the value from GPU buffer or command buffer (on Metal) which is asynchronous.

haoxli

comment created time in 2 months

push eventhaoxli/gpuweb

Li Hao

commit sha 9bb9f380dd39727ef23b61ac1b64f630629493d0

Move measureExecutionTime to GPUCommandEncoderDescriptor

view details

push time in 2 months

push eventhaoxli/gpuweb

Li Hao

commit sha 0b6db3fd0760f639094bc5333fec6b0eb2d4a6ce

Move measureExecutionTime to GPUCommandEncoderDescriptor

view details

push time in 2 months

Pull request review commentgpuweb/gpuweb

Add time query on GPUCommandBuffer

 GPUCommandBuffer includes GPUObjectBase;  <script type=idl> dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {+    boolean measureExecutionTime = false;

Thanks for the explanation.

haoxli

comment created time in 2 months

Pull request review commentgpuweb/gpuweb

Add time query on GPUCommandBuffer

 GPUCommandBuffer includes GPUObjectBase;  <script type=idl> dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {+    boolean executionTimeEnabled = false;

The promise should then be resolved in GPUQueue.submit().

After GPUQueue.submit(), the results will be resolved to GPUBuffer. Shouldn't the executionTime promise be resolved when we call GPUCommandBuffer.executionTime which read the result to CPU memory from GPUBuffer?

haoxli

comment created time in 2 months

Pull request review commentgpuweb/gpuweb

Add time query on GPUCommandBuffer

 GPUCommandBuffer includes GPUObjectBase;  <script type=idl> dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {+    boolean measureExecutionTime = false;

My thought is we can insert timestmap query in CommandBuffer::RecordCommands if we measureExecutionTime is enabled in GPUCommandBufferDescriptor.

This is most likely required for some implementations

I'm not sure if you mean Metal backend which has three types of encoders. For Metal, we can read the GPUStartTime and GPUEndTime directly from command buffer when it's completed, so it doesn't need this flag.

haoxli

comment created time in 2 months

push eventhaoxli/gpuweb

Hao Li

commit sha 8bc5ef9e9e371fdd290af76039bdf9d94146e174

Rename executionTimeEnabled to measureExecutionTime Co-authored-by: Kai Ninomiya <kainino1@gmail.com>

view details

push time in 2 months

push eventhaoxli/gpuweb

Hao Li

commit sha 2e37d382ad092a60a18079eb8e7be73a6d3afaac

Rename attributes Co-authored-by: Kai Ninomiya <kainino1@gmail.com>

view details

push time in 2 months

PR opened gpuweb/gpuweb

Add time query on GPUCommandBuffer

The getExecutionTime return the the total time, in seconds, that GPU execute this command buffer. (#614 )

+11 -0

0 comment

1 changed file

pr created time in 2 months

create barnchhaoxli/gpuweb

branch : time-query-command-buffer

created branch time in 2 months

push eventhaoxli/gpuweb

Kai Ninomiya

commit sha 7419a3a1853a82b7ff7d428d00de17a980a34ace

Clean trailing whitespace (#865)

view details

push time in 2 months

issue openedgpuweb/gpuweb

How to read 64-bits integter from GPUBuffer?

Currently ArrayBuffer has no Uint64Array/Int64Array type. If we want to read int64 or uint64 data from GPUBuffer such as timestamp query results, how can we do that?

In ECMA 2020, there is a BigInt64Array/BigUint64Array for that, but it's not supported on Safari (compatibility).

created time in 2 months

push eventhaoxli/gpuweb

dan sinclair

commit sha 39685bd7ff89f61fc3830ee313fb6071b8b417d1

Remove workgroup_size from builtin list. (#824) The WorkgroupSize in Vulkan is special in that it must be set on a specialization constant or a constant value. This CL removes it from the list as it was not correctly specified with this restriction. Issue #750

view details

Jeff Gilbert

commit sha 5ddf3a6806ac50e589eec160026cf7cf0f200aa2

Remove `break if` in favor of `if () { break; }`. (#643)

view details

David Neto

commit sha ef51db44f4fa23f1ecb733d61700e2199e9fbbc0

Add type rules for binary operators (#772) * Add type rules for binary operators * Remove >>>. Right shift depends on operand type Fixes #726 #790 #825

view details

David Neto

commit sha acedfe593c8c4c1cd11b87e60da40a1011732be9

"zero" of storable types, rework initializers (#764) The generically zero-able types correspond exactly with storable types, so I tied zero-ability to the storable type concept. Eliminate the concept of a "default" type. Instead define the zero value of a storable type. Clarify that a variable declaration can have an initializer. Specify the initial value of a variable, and it's the zero value for the store type if the declaration had no initializer. This still leaves up in the air exactly when a variable is "created" as we haven't specified an execution order or even the concept of execution of a statement. Initializers are only permitted for 3 storage classes Remove "Initializers" section later on, as its content is now mostly absorbed into the "Variables" section. Hint at future reorganization, to insert a "Evaluation and Execution" section between "Types" and "Grammar" major sections. Fixes #685

view details

dan sinclair

commit sha 95070cbd3c2ce2d06ff0d190a29f237e01cd0b7d

Remove unless. (#835) This CL removes the unless statement from the grammar. The unless keyword has been reserved if we determine we want unless in the future. Fixes #577

view details

dan sinclair

commit sha 8246bfe6b03267bf200cd4829f14e8a7889fc505

Convert symbols to code blocks. (#836) This CL wraps the various symbol tokens into code blocks to prevent accidental collisions with HTML symbols.

view details

David Neto

commit sha c2be4cdade3f34c39a174e704cb2f12f344fbb78

Wgsl switch requires default (#731) There must be exactly one default clause. Fixes #630, #714 Builds on #713

view details

Hao Li

commit sha e08375444debb53f369fcdc39e74d72f8920b5f6

Remove argument in endOcclusionQuery (#840) We clarify begin/end operations are not allowed to be nested, so remove argument in endOcclusionQuery as same as endPipelineStatisticsQuery.

view details

Brandon Jones

commit sha 1660ec78e6bc121a4c4e11c728570d5791fcf50b

Documenting render pass creation and descriptors (#831) * Documenting render pass creation and descriptors * Update spec/index.bs Co-authored-by: Kai Ninomiya <kainino1@gmail.com> * Update spec/index.bs Co-authored-by: Kai Ninomiya <kainino1@gmail.com> * Addressing further feedback * Addressing remaining feedback * Hopefully last pass at feedback updates * Apply suggestions from code review * add GPUTextureView.[[texture]] from #838 Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

Kai Ninomiya

commit sha d2929d96c932cc25112defd9c1ae1fda34dd7919

Fix xml parsing warnings (#844)

view details

Kai Ninomiya

commit sha 6d6e392248a39a1a984c305c67f39429fe1a0846

Disallow use of irrelevant GPUBindGroupLayoutEntry members (#839) * Disallow use of irrelevant GPUBindGroupLayoutEntry members Fixes #829 * revise

view details

Kai Ninomiya

commit sha 00abd439544f2557c070956ba18511de81413039

Fix handling of storageTextureFormat in createBindGroup (#838) * Fix handling of storageTextureFormat in createBindGroup This previously referred to the non-existent bindingDescriptor.storageTextureFormat. Fixed to validate the layoutBinding.storageTextureFormat against the resource.[[descriptor]].format. * nits

view details

Corentin Wallez

commit sha 1e80af5730f8a67bfdcd3e60f721172b74ef73d6

MapAsync tweaks following #796 (#843) * MapAsync tweaks following #796 * Address Kai's comment * Update spec/index.bs Co-authored-by: Justin Fan <jussnf@gmail.com>

view details

Justin Fan

commit sha 0dfd27146493025126c63a5f1a4ca69788c0ad47

samplers (#805) Co-authored-by: Justin Fan <justin_fan@apple.com>

view details

Hao Li

commit sha 45142605a9a71f61eda62e18b4231b5dfa92e543

Query API: Timestamp Query (#771) * Query API: Timestamp Query * Add writeTimestamp in GPUCommandEncoder * Add extension requirements in queries * Add issue for constraints on the availability * Unified text format * Move writeTimestamp to render/compute encoders beginPipelineStatisticsQuery and endPipelineStatisticsQuery have been changed in #797, remove them in GPUProgrammablePassEncoder which are added when rebasing. * Update spec/index.bs * Update spec/index.bs

view details

Kai Ninomiya

commit sha 0cc44c818e7f6d862b1a40e0ccb6b279654fcd29

minor section changes to match TOC (#853)

view details

Brandon Jones

commit sha 9f8a445d3de1093c43e9913466b74d2cedeb45f0

Document compute pass creation (#846)

view details

Dzmitry Malyshau

commit sha 0e437f2fcc1b97921634b52cbbe7b792a3e57913

Add minimumBufferSize to BGL entry (#678) * Add minimumBufferSize to BGL entry * Add pipeline validation text * Rename to minBufferBindingSize, address review nots * Update spec/index.bs Co-authored-by: Justin Fan <jussnf@gmail.com> * Update spec/index.bs Co-authored-by: Justin Fan <jussnf@gmail.com> Co-authored-by: Justin Fan <jussnf@gmail.com>

view details

Corentin Wallez

commit sha 0ceb9d06fd1b8501611a0dbeb6c0b646f5e6d404

Add BC formats. (#812) * Add BC formats. * Update spec/index.bs Co-authored-by: Kai Ninomiya <kainino1@gmail.com>

view details

push time in 2 months

Pull request review commentgpuweb/gpuweb

Query API: Timestamp Query

 enum GPUPipelineStatisticName { }; </script> -* When resolving pipeline statistics query, each result is written into uint64, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.+When resolving pipeline statistics query, each result is written into {{GPUSize64}}, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.++The {{GPURenderPassEncoder/beginPipelineStatisticsQuery()}} and {{GPURenderPassEncoder/endPipelineStatisticsQuery()}} (on both {{GPUComputePassEncoder}} and {{GPURenderPassEncoder}}) cannot be nested. A pipeline statistics query must be ended before beginning another one.

This line is a format update for [1], not a newly added line.

haoxli

comment created time in 2 months

Pull request review commentgpuweb/gpuweb

Query API: Timestamp Query

 enum GPUPipelineStatisticName { }; </script> -* When resolving pipeline statistics query, each result is written into uint64, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.+When resolving pipeline statistics query, each result is written into {{GPUSize64}}, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.++The {{GPURenderPassEncoder/beginPipelineStatisticsQuery()}} and {{GPURenderPassEncoder/endPipelineStatisticsQuery()}} (on both {{GPUComputePassEncoder}} and {{GPURenderPassEncoder}}) cannot be nested. A pipeline statistics query must be ended before beginning another one.++Pipeline statistics query requires {{GPUExtensionName/pipeline-statistics-query}} is available on the device.+++## Timestamp Query ## {#timestamp}+Timestamp query allows application to write timestamp values to a {{GPUQuerySet}} by calling {{GPURenderPassEncoder/writeTimestamp()}} on {{GPUComputePassEncoder}} or {{GPURenderPassEncoder}} or {{GPUCommandEncoder}}, and then resolve timestamp values in **nanoseconds** (type of {{GPUSize64}}) to a {{GPUBuffer}} (using {{GPUCommandEncoder/resolveQuerySet()}}).++Timestamp query requires {{GPUExtensionName/timestamp-query}} is available on the device. -* {{GPURenderPassEncoder/beginPipelineStatisticsQuery()}} and {{GPURenderPassEncoder/endPipelineStatisticsQuery()}} (on both {{GPUComputePassEncoder}} and {{GPURenderPassEncoder}}) cannot be nested. A pipeline statistics query must be ended before beginning another one.

[1]

haoxli

comment created time in 2 months

PR opened gpuweb/gpuweb

Remove argument in endOcclusionQuery

We clarify begin/end operations are not allowed to be nested in #794 , so remove argument in endOcclusionQuery as same as endPipelineStatisticsQuery.

+1 -1

0 comment

1 changed file

pr created time in 2 months

create barnchhaoxli/gpuweb

branch : remove-end-occlusion-args

created branch time in 2 months

push eventhaoxli/gpuweb

Li Hao

commit sha 7c478a86f3e8a59fe44bcf6f2276efd22c2ad9a0

Move writeTimestamp to render/compute encoders beginPipelineStatisticsQuery and endPipelineStatisticsQuery have been changed in #797, remove them in GPUProgrammablePassEncoder which are added when rebasing.

view details

push time in 2 months

Pull request review commentgpuweb/gpuweb

Query API: Timestamp Query

 interface mixin GPUProgrammablePassEncoder {     void pushDebugGroup(USVString groupLabel);     void popDebugGroup();     void insertDebugMarker(USVString markerLabel);++    void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);

Oh, I forgot that timestamp query is also not supported on render bundle encoder, as same as pipeline statistics query, so we need to move writeTimestamp to render encoder and compute encoder.

haoxli

comment created time in 2 months

Pull request review commentgpuweb/gpuweb

Query API: Timestamp Query

 interface mixin GPUProgrammablePassEncoder {     void pushDebugGroup(USVString groupLabel);     void popDebugGroup();     void insertDebugMarker(USVString markerLabel);++    void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);

Yes, beginPipelineStatisticsQuery and endPipelineStatisticsQuery have been changed in #797, this two lines should be added when git rebase, I will remove them.

haoxli

comment created time in 2 months

Pull request review commentgpuweb/gpuweb

Query API: Timestamp Query

 enum GPUPipelineStatisticName { }; </script> -When resolving pipeline statistics query, each result is written into uint64, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.+When resolving pipeline statistics query, each result is written into {{GPUSize64}}, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.++Pipeline statistics query requires {{GPUExtensionName/pipeline-statistics-query}} is available on the device.+++## Timestamp Query ## {#timestamp}+Timestamp query allows application to write timestamp values to a {{GPUQuerySet}} by calling {{GPUProgrammablePassEncoder/writeTimestamp()}} on render pass or compute pass, and then resolve timestamp values in **nanoseconds** (type of {{GPUSize64}}) to a {{GPUBuffer}} (using {{GPUCommandEncoder/resolveQuerySet()}}).

Done. Do we need to open an issue for further discussion?

haoxli

comment created time in 2 months

push eventhaoxli/gpuweb

Brandon Jones

commit sha 8cb9ebd586afbd95a9827cb467bae850985779ae

Specifies the state machine of GPUCommandEncoder (#752) * Specifies the state machine of GPUCommandEncoder * Use dot syntax, as pointed out by @Kangz * Address feedback from @kvark * Fixing some build errors * Addressing @kainino0x's feedback * Apply suggestions from code review Co-authored-by: Kai Ninomiya <kainino1@gmail.com>

view details

Dean Jackson

commit sha 31031076e77914baf4b8a703d38c51a5750cd340

Sort the 'Under Discussion' column by putting MVP at the top

view details

Dean Jackson

commit sha 23b35a9f7b62e427670ef9eef45c7c02f6a036f3

Ignore node_modules in tools directory

view details

Jeff Gilbert

commit sha 68331a1dc2074e1965baee3cf7dabe90f1144043

Add GPUShaderModuleDescriptor/sourceMap. (#645) * Add GPUShaderModuleDescriptor/sourceMap. * Dictionary members are optional unless required, s/non-null/defined/. * `sourceMap` MAY be a source-map-v3 format, but it's not required.

view details

Jeff Gilbert

commit sha 62536354e07d5d5449bd4fe83cefbb198fe0795e

Add pipeline shader module error enumeration. (#646) * Add pipeline shader module error enumeration. * Move compilationMessages to GPUShaderModule. * Add `GPUCompilationMessage.message` (oops). * Remove sourcemaps references for now, and return info iface that has seq<message>. * Apply suggestions from code review * IDL syntax fixes Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

Jiawei Shao

commit sha bb3fccc1bde901c127e23f28df6c943eb00af0a0

Disallow source and destination to be the same buffer in B2B copy (#788) * Disallow source and destination to be the same buffer in B2B copy * Small fix * Address reviewer's comment

view details

Dzmitry Malyshau

commit sha 5526a9c3c96ea5dfe6a34b155c58e046f65a8257

Read-only depth-stencil pass (#746)

view details

Kai Ninomiya

commit sha 9a642f397df8e6744c6b9338ef62d36688621bc8

Replace DOMString with USVString for wgsl and debug strings (#787) Issue: #784

view details

Brandon Jones

commit sha 17bdb1723836f63b7046c705c2ffe58c429456cf

Enable 'make online' to output bikeshed validation (#786)

view details

Dzmitry Malyshau

commit sha cc744595378aa737add428161fab0146f90c9ac1

Add Queue/writeTexture method (#761) * Add writeTexture * Refactor writeXxx parameters * Turn copy view validations into proper algorithms * Apply suggestions from code review * wrap writeBuffer and writeTexture in <div algorithm> Co-authored-by: Kai Ninomiya <kainino1@gmail.com> Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

Paul Kernfeld

commit sha 4b711a8cd99f758e262e72b877fb39f3d1912fc7

Fix *N8 to *N* in struct type overview (#729)

view details

David Neto

commit sha 26088ba8ea1a149e579e65e5b52a93544d40a7d7

Remove TODO for signed and unordered comparisons (#791) We no longer need those builtins: - PR https://github.com/gpuweb/gpuweb/pull/772 added type rules for signed integer comparisons - Resolution of https://github.com/gpuweb/gpuweb/issues/706 is to not have unordered floating point comparisons as a direct language feature.

view details

David Neto

commit sha 7861a34efa673808d0ac3dff0153be3ba34a9d1b

Make tokens for << >> >>> (#792) Make tokens for << >> >>> For example, disallow a < < b from being recognized as a left-shift.

view details

Corentin Wallez

commit sha 8e82f010a5a7ad2bcc68ba3e31fc1a0df8953ee5

Small change to writeBuffer/Texture (#795) * Small change to writeBuffer/Texture This does the following changes to `writeBuffer/Texture`: - Reorder the arguments so that the destination comes first. Contrary to copies that go from source to destination, this writes to an object some data. So the object written to is more important. - Rename `source` to `data`. - Rename `destination` to `buffer` in writeBuffer. - `dataOffset` is made optional and defaulting to 0. It is also added to `writeTexture` so that subparts of an `ArrayBuffer` can be selected without having to create garbage. (and validation updated) (another reason why the reordering was done) * Address some of Kai's comments * Address comments * reoder

view details

Brandon Jones

commit sha c6d1fb96b957f437b61a739466dd34323c342fbb

Documented debug marker methods (#785) * Documented debug marker methods * Address feedback from @kvark * Addressing feedback from @kainino0x

view details

dan sinclair

commit sha bbda4fdbce5ce2fea0c99ec66a69bb58abde7bb3

Remove NOP. (#804) The NOP command was put in to satisfy complete bijectivity to SPIR-V. Since that is not a goal anymore, the nop is no longer necessary. Removed.

view details

Dzmitry Malyshau

commit sha 01b20b4ad93fabae1e8e0d7752515f69708d33e0

Fix getMappedRange arguments (#813)

view details

dan sinclair

commit sha 2b6305abd2aabb72ca76070208f06e915fafd293

[wgsl] Fix definition of const_expr (#818) This CL updates the const_expr to use the proper * instead of ?. Fixes #800

view details

dan sinclair

commit sha 5b733931dd93f17beebc0e141b9758fa00dc8ba4

[wgsl] Minor spec cleanups. (#815) This CL fixes up a couple incorrect formatting options in the spec and moves the return statement up to a spot where it makes a bit more sense.

view details

dan sinclair

commit sha 7051ad71362aa62949763c8ff01126be2f542059

[wgsl] Fix rendering of FLOAT_LITERAL. (#817) Fixes #816

view details

push time in 2 months

push eventhaoxli/gpuweb

Corentin Wallez

commit sha 8e82f010a5a7ad2bcc68ba3e31fc1a0df8953ee5

Small change to writeBuffer/Texture (#795) * Small change to writeBuffer/Texture This does the following changes to `writeBuffer/Texture`: - Reorder the arguments so that the destination comes first. Contrary to copies that go from source to destination, this writes to an object some data. So the object written to is more important. - Rename `source` to `data`. - Rename `destination` to `buffer` in writeBuffer. - `dataOffset` is made optional and defaulting to 0. It is also added to `writeTexture` so that subparts of an `ArrayBuffer` can be selected without having to create garbage. (and validation updated) (another reason why the reordering was done) * Address some of Kai's comments * Address comments * reoder

view details

Brandon Jones

commit sha c6d1fb96b957f437b61a739466dd34323c342fbb

Documented debug marker methods (#785) * Documented debug marker methods * Address feedback from @kvark * Addressing feedback from @kainino0x

view details

dan sinclair

commit sha bbda4fdbce5ce2fea0c99ec66a69bb58abde7bb3

Remove NOP. (#804) The NOP command was put in to satisfy complete bijectivity to SPIR-V. Since that is not a goal anymore, the nop is no longer necessary. Removed.

view details

Dzmitry Malyshau

commit sha 01b20b4ad93fabae1e8e0d7752515f69708d33e0

Fix getMappedRange arguments (#813)

view details

dan sinclair

commit sha 2b6305abd2aabb72ca76070208f06e915fafd293

[wgsl] Fix definition of const_expr (#818) This CL updates the const_expr to use the proper * instead of ?. Fixes #800

view details

dan sinclair

commit sha 5b733931dd93f17beebc0e141b9758fa00dc8ba4

[wgsl] Minor spec cleanups. (#815) This CL fixes up a couple incorrect formatting options in the spec and moves the return statement up to a spot where it makes a bit more sense.

view details

dan sinclair

commit sha 7051ad71362aa62949763c8ff01126be2f542059

[wgsl] Fix rendering of FLOAT_LITERAL. (#817) Fixes #816

view details

Corentin Wallez

commit sha 1c06701bd034424203d2b7b4cea42c1cd0c8236d

Add GPULimits.maxUniformBufferBindingSize. (#803) * Add GPULimits.maxUniformBufferBindingSize. Start with a minimum maximum of 2^14 as that's the limit in Vulkan that's hit for various ARM devices and for Swiftshader. Limits for Metal and D3D12 are unclear but should be more than this. The limit could be increased if we decided that the ARM devices should be falling back to a WebGPU-compatibility feature level instead. * Address kvark's comments * Address more comments

view details

Jiawei Shao

commit sha 57c41792cc1338cc26990ccf36a56c5a5c03650d

Disallow using image cube or cube map array texture views as storage textures (#798) * Disallow using cube map or cube map array texture views as storage textures This patch adds validation to disallow using cube map and cube map array texture views as storage textures as HLSL doesn't support RWTextureCube or RWTextureCubeArray, and Load() function cannot be called on TextureCube or TextureCubeArray. * Small fix

view details

Hao Li

commit sha 0268a8de89796efffdd407da9d63d266e552e437

Move pipeline statistics query to render encoder and compute encoder (#797) These query APIs do not support on render bundles.

view details

Kai Ninomiya

commit sha 7ace1939d4a824a375c4824ac3066a5a89f52d3d

AllowShared in writeBuffer/writeTexture (#819) * AllowShared in writeBuffer/writeTexture * size unspecified

view details

push time in 2 months

issue commentgpuweb/gpuweb

Pipeline statistics clarifications

@kvark Thanks for clarify. Metal just specify what the returned values are stand for. D3D12 has some descriptions to explain what will affect the results.

I think these values are intended to measure relative complexity of different parts of applications and get insights into the GPU operations while performance tuning. So how about add description to reminder users like this: Note: These values are intended to measure relative statistics generated by operations of the device. Be careful to use these values in the release version of applications, because various device architectures may count these values differently.

Kangz

comment created time in 3 months

push eventhaoxli/gpuweb

Li, Hao

commit sha 64ff17e02c54a4570e4461b16e25b0ddbd5fb26f

Move pipeline statistics query to render encoder and compute encoder These query APIs do not support on render bundles.

view details

push time in 3 months

Pull request review commentgpuweb/gpuweb

Move pipeline statistics query to render encoder and compute encoder

 interface GPUComputePassEncoder {     void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);     void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); +    void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);+    void endPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);

Yes, I will remove these args.

haoxli

comment created time in 3 months

Pull request review commentgpuweb/gpuweb

Move pipeline statistics query to render encoder and compute encoder

 interface GPUComputePassEncoder {     void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);     void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); +    void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);

Another consideration is there is also an occlusionQuerySet in GPURenderPassDescriptor, if add a pipelineStatisticsQuerySet, maybe it's a duplication in spec, and there will be timestamp query in the future.

haoxli

comment created time in 3 months

issue commentgpuweb/gpuweb

Pipeline statistics clarifications

I filed an issue for the nested queries in Vulkan validation layers: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1874.

@kvark Now we use an array of enum in GPUPipelineStatisticName to specified pipeline statistics, and also return 0 if the specified pipeline statistics is not supported. Difference is the number and order of the results written to buffer match the number and order of the specified pipeline statistics, in Vulkan, they are fixed.

Kangz

comment created time in 3 months

issue openedKhronosGroup/Vulkan-ValidationLayers

Validation layer does not check the queryPool when calling vkCmdBeginQuery nested with same queryType

For vkCmdBeginQuery and vkCmdBeginQueryIndexedEXT, Vulkan spec says:

queryPool must have been created with a queryType that differs from that of any queries that are active within commandBuffer

But if we run the nested query operations with same query pool as below:

  vkCmdBeginQuery(command_buffer,  query_pool, 0 /*slot*/, 0 /*flags*/);
  vkCmdDraw(commandbuffer, 3, 1, 0, 0);

  vkCmdBeginQuery(command_buffer, query_pool, 1 /*slot*/, 0 /*flags*/);
  vkCmdDraw(commandbuffer, 3, 1, 3, 0);
  vkCmdEndQuery(command_buffer, query_pool, 1 /*slot*/);

  vkCmdEndQuery(command_buffer, query_pool, 0 /*slot*/);

When the first vkCmdBeginQuery is called, the query is active, so the sencond vkCmdBeginQuery should not be allowed until the first one is ended, the validation layer does not catch this problem, and I can get the results of the two queries.

created time in 3 months

pull request commentgpuweb/gpuweb

Query API: Timestamp Query

Actually the timestamps returned to users will be a time delta processed by compute shader, the first timestamp will be 0 , the following values are the deltas based on the first one.

But no matter how to return the results of timestamp query, they're in nanosecond. If we want to sidestep potential risks in high precision, how about define an internal timestamp period to increase nanosecond interval like Vulkan did (VkPhysicalDeviceLimits::timestampPeriod).

haoxli

comment created time in 3 months

issue commentgpuweb/gpuweb

Pipeline statistics clarifications

Oh, understand what you mean, but strangely, I can test this case pass with Vulkan validation layers, I will file the issue for the validation and add description on spec to disallow the nesting.

Kangz

comment created time in 3 months

PR opened gpuweb/gpuweb

Move pipeline statistics query to render encoder and compute encoder

These query APIs do not support on render bundles, move them to GPUComputePassEncoder and GPURenderPassEncoder. Issue: #794

+6 -3

0 comment

1 changed file

pr created time in 3 months

create barnchhaoxli/gpuweb

branch : pipeline-statistics-fix

created branch time in 3 months

push eventhaoxli/gpuweb

Paul Kernfeld

commit sha 4b711a8cd99f758e262e72b877fb39f3d1912fc7

Fix *N8 to *N* in struct type overview (#729)

view details

David Neto

commit sha 26088ba8ea1a149e579e65e5b52a93544d40a7d7

Remove TODO for signed and unordered comparisons (#791) We no longer need those builtins: - PR https://github.com/gpuweb/gpuweb/pull/772 added type rules for signed integer comparisons - Resolution of https://github.com/gpuweb/gpuweb/issues/706 is to not have unordered floating point comparisons as a direct language feature.

view details

David Neto

commit sha 7861a34efa673808d0ac3dff0153be3ba34a9d1b

Make tokens for << >> >>> (#792) Make tokens for << >> >>> For example, disallow a < < b from being recognized as a left-shift.

view details

push time in 3 months

pull request commentwebgpu-native/webgpu-headers

Add pipeline statistics queries

Yes, they are not supported on bundles, but we can nest query operations for a same queryset or querysets with different types.

Kangz

comment created time in 3 months

issue commentgpuweb/gpuweb

Pipeline statistics clarifications

Should they be allowed in GPURenderBundle? They currently are, but it seems to conflict with our earlier decision to disallow occlusion queries on render bundles.

Yes, you're right, D3D12 and Metal don't support Query API on render bundles. I will move the Pipeline Statistcs APIs to GPURenderPassEncoder and GPUComputePassEncoder.

queryPool must have been created with a queryType that differs from that of any queries that are active within commandBuffer.

It only does not allow to create queryPool with same query type, but we can nest the query operation for a same query type, even for different query types, such as:

pass.beginPipelineStatisticsQuery(queryset, 0);
pass.beginPipelineStatisticsQuery(queryset, 1);
pass.draw(3, 1, 0, 0);
pass.endPipelineStatisticsQuery(queryset, 1);
pass.draw(6, 1, 3, 0);
pass.endPipelineStatisticsQuery(queryset, 0);

or

pass.beginPipelineStatisticsQuery(psQuerySet, 0);
pass.writeTimestamp(tsQuerySet, 0);
pass.draw(3, 1, 0, 0);
pass.writeTimestamp(tsQuerySet, 1);
pass.draw(6, 1, 3, 0);
pass.endPipelineStatisticsQuery(psQuerySet, 0);

Maybe we can remove the args of queryset becase we have seprate api for different queries, but if removed, we need told users which the queryset the results are stored in, and the created queryset is only used when resolving, maybe also considerring not expose queryset, and resolving the data with query type instead, becasue there is only one queryset for each type, we can handle them in native. I think it will increase the complexity of the implementation, so currently I prefer to keep these arguments.

Kangz

comment created time in 3 months

push eventhaoxli/gpuweb

Jiawei Shao

commit sha bb3fccc1bde901c127e23f28df6c943eb00af0a0

Disallow source and destination to be the same buffer in B2B copy (#788) * Disallow source and destination to be the same buffer in B2B copy * Small fix * Address reviewer's comment

view details

Dzmitry Malyshau

commit sha 5526a9c3c96ea5dfe6a34b155c58e046f65a8257

Read-only depth-stencil pass (#746)

view details

Kai Ninomiya

commit sha 9a642f397df8e6744c6b9338ef62d36688621bc8

Replace DOMString with USVString for wgsl and debug strings (#787) Issue: #784

view details

Brandon Jones

commit sha 17bdb1723836f63b7046c705c2ffe58c429456cf

Enable 'make online' to output bikeshed validation (#786)

view details

Dzmitry Malyshau

commit sha cc744595378aa737add428161fab0146f90c9ac1

Add Queue/writeTexture method (#761) * Add writeTexture * Refactor writeXxx parameters * Turn copy view validations into proper algorithms * Apply suggestions from code review * wrap writeBuffer and writeTexture in <div algorithm> Co-authored-by: Kai Ninomiya <kainino1@gmail.com> Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

Li, Hao

commit sha 8eac1a71a3c523dcf2819755d2a81063f6a65da6

Query API: getElapsedTime on command buffer Add getElapsedTime to get execution time of entire command buffer.

view details

push time in 3 months

push eventhaoxli/gpuweb

Jiawei Shao

commit sha bb3fccc1bde901c127e23f28df6c943eb00af0a0

Disallow source and destination to be the same buffer in B2B copy (#788) * Disallow source and destination to be the same buffer in B2B copy * Small fix * Address reviewer's comment

view details

Dzmitry Malyshau

commit sha 5526a9c3c96ea5dfe6a34b155c58e046f65a8257

Read-only depth-stencil pass (#746)

view details

Kai Ninomiya

commit sha 9a642f397df8e6744c6b9338ef62d36688621bc8

Replace DOMString with USVString for wgsl and debug strings (#787) Issue: #784

view details

Brandon Jones

commit sha 17bdb1723836f63b7046c705c2ffe58c429456cf

Enable 'make online' to output bikeshed validation (#786)

view details

Dzmitry Malyshau

commit sha cc744595378aa737add428161fab0146f90c9ac1

Add Queue/writeTexture method (#761) * Add writeTexture * Refactor writeXxx parameters * Turn copy view validations into proper algorithms * Apply suggestions from code review * wrap writeBuffer and writeTexture in <div algorithm> Co-authored-by: Kai Ninomiya <kainino1@gmail.com> Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

push time in 3 months

create barnchhaoxli/gpuweb

branch : command-buffer-elapsed-time

created branch time in 3 months

push eventhaoxli/gpuweb

Brandon Jones

commit sha 8cb9ebd586afbd95a9827cb467bae850985779ae

Specifies the state machine of GPUCommandEncoder (#752) * Specifies the state machine of GPUCommandEncoder * Use dot syntax, as pointed out by @Kangz * Address feedback from @kvark * Fixing some build errors * Addressing @kainino0x's feedback * Apply suggestions from code review Co-authored-by: Kai Ninomiya <kainino1@gmail.com>

view details

Dean Jackson

commit sha 31031076e77914baf4b8a703d38c51a5750cd340

Sort the 'Under Discussion' column by putting MVP at the top

view details

Dean Jackson

commit sha 23b35a9f7b62e427670ef9eef45c7c02f6a036f3

Ignore node_modules in tools directory

view details

Jeff Gilbert

commit sha 68331a1dc2074e1965baee3cf7dabe90f1144043

Add GPUShaderModuleDescriptor/sourceMap. (#645) * Add GPUShaderModuleDescriptor/sourceMap. * Dictionary members are optional unless required, s/non-null/defined/. * `sourceMap` MAY be a source-map-v3 format, but it's not required.

view details

Jeff Gilbert

commit sha 62536354e07d5d5449bd4fe83cefbb198fe0795e

Add pipeline shader module error enumeration. (#646) * Add pipeline shader module error enumeration. * Move compilationMessages to GPUShaderModule. * Add `GPUCompilationMessage.message` (oops). * Remove sourcemaps references for now, and return info iface that has seq<message>. * Apply suggestions from code review * IDL syntax fixes Co-authored-by: Kai Ninomiya <kainino@chromium.org>

view details

push time in 3 months

push eventhaoxli/cts

Li, Hao

commit sha c2ed70c593ccb5c61b6d16cf9c765c9a2f5f05e7

Index format tests Add test cases for testing drawIndexed, IndexFormat, Primitive restart

view details

push time in 3 months

PR opened gpuweb/cts

Index format tests

Add test cases for testing drawIndexed, IndexFormat, Primitive restart

+255 -0

0 comment

1 changed file

pr created time in 3 months

create barnchhaoxli/cts

branch : index-format-tests

created branch time in 3 months

Pull request review commentgpuweb/cts

Index format tests

+export const description = `Index format tests.`;++import { TestGroup } from '../../../../../common/framework/test_group.js';+import { GPUTest } from '../../../../gpu_test.js';+import glslangModule from '../../../../util/glslang.js';++export class IndexFormatTest extends GPUTest {+  private glslang: any;+  private pipeline!: GPURenderPipeline;+  private colorAttachment!: GPUTexture;+  private result!: GPUBuffer;+  private swapChainFormat: GPUTextureFormat = 'bgra8unorm';++  async initResources(format: GPUIndexFormat): Promise<void> {+    // glslang module+    this.glslang = await glslangModule();++    // render pipeline+    this.pipeline = this.MakeRenderPipeline(format);++    const context = this.CreateRenderContext(true);

Thanks, I will use the way in glsl-dependent branch.

haoxli

comment created time in 3 months

Pull request review commentgpuweb/cts

Index format tests

+export const description = `Index format tests.`;++import { TestGroup } from '../../../../../common/framework/test_group.js';+import { GPUTest } from '../../../../gpu_test.js';+import glslangModule from '../../../../util/glslang.js';++export class IndexFormatTest extends GPUTest {+  private glslang: any;+  private pipeline!: GPURenderPipeline;+  private colorAttachment!: GPUTexture;+  private result!: GPUBuffer;+  private swapChainFormat: GPUTextureFormat = 'bgra8unorm';++  async initResources(format: GPUIndexFormat): Promise<void> {+    // glslang module+    this.glslang = await glslangModule();++    // render pipeline+    this.pipeline = this.MakeRenderPipeline(format);++    const context = this.CreateRenderContext(true);+    if (context !== null) {+      const swapChain: GPUSwapChain = context.configureSwapChain({+        device: this.device,+        format: this.swapChainFormat,+        usage: GPUTextureUsage.COPY_SRC | GPUTextureUsage.OUTPUT_ATTACHMENT,+      });+      this.colorAttachment = swapChain.getCurrentTexture();+    }++    // result buffer+    this.result = this.device.createBuffer({+      size: 4,+      usage: GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST,+    });+  }++  CreateRenderContext(display: boolean): any {+    const canvas = document.createElement('canvas');+    canvas.width = 100;+    canvas.height = 100;+    // Display rendering on test page+    if (display) {+      const container = document.getElementById('canvasContainer');+      if (container) {+        container.innerHTML = '';+        container.append(canvas);+      }+    }+    return canvas.getContext('gpupresent');+  }++  MakeRenderPipeline(format: GPUIndexFormat): GPURenderPipeline {+    const vertexShaderGLSL = `#version 450+    layout(location = 0) in vec4 pos;+    void main() {+        gl_Position = pos;+    }`;++    const fragmentShaderGLSL = `#version 450+    layout(location = 0) out vec4 fragColor;+    void main() {+        fragColor = vec4(0.0, 1.0, 0.0, 1.0);+    }`;++    return this.device.createRenderPipeline({+      layout: this.device.createPipelineLayout({ bindGroupLayouts: [] }),++      vertexStage: {+        module: this.device.createShaderModule({+          code: this.glslang.compileGLSL(vertexShaderGLSL, 'vertex'),+        }),+        entryPoint: 'main',+      },+      fragmentStage: {+        module: this.device.createShaderModule({+          code: this.glslang.compileGLSL(fragmentShaderGLSL, 'fragment'),+        }),+        entryPoint: 'main',+      },++      primitiveTopology: 'triangle-strip',++      colorStates: [+        {+          format: this.swapChainFormat,+        },+      ],++      vertexState: {+        indexFormat: format,+        vertexBuffers: [+          {+            arrayStride: 4 * 4,+            stepMode: 'vertex',+            attributes: [+              {+                format: 'float4',+                offset: 0,+                shaderLocation: 0,+              },+            ],+          },+        ],+      },+    });+  }++  MakeBufferMapped(arrayBuffer: ArrayBuffer, usage: number): GPUBuffer {+    const [buffer, bufferMapping] = this.device.createBufferMapped({+      size: arrayBuffer.byteLength,+      usage,+    });++    if (arrayBuffer instanceof Float32Array) {

I tested it's true if arrayBuffer = new Float32Array()

haoxli

comment created time in 3 months

fork haoxli/cts

WebGPU Conformance Test Suite

https://gpuweb.github.io/cts/

fork in 3 months

delete branch haoxli/cts

delete branch : index-format-tests

delete time in 3 months

push eventhaoxli/cts

Kai Ninomiya

commit sha 9cbb800a967708b0a72f252fd045d973f77755be

Make test cases hierarchical, and refactor/cleanup a lot in the process (#181) * update tests, approximately * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * unittests:loading:* now passes * passes 63 unittests, but not all are running... * typechecks!! * 58 unittests passing * reenable getStackTrace tests * wip * finally all tests and checks pass! * fixups * wip * replace all spaces with underscores in test names * wip * wip * wip * Dissolve TestLoader (now just use DefaultTestFileLoader) * tighten ParamSpec type * rename ParamSpec -> CaseParams * make kParamSeparator ";", now standalone runner is working! * add separate icon for leaf run buttons * file renames * remove user-select:all (not really needed anymore, triple click works fine now) * cleanup some tests, add tests for test queries * split interface for defining and running TestGroups * more cleanup, fix URL encoding stuff, and standalone HTML * fix readmes for parents of query * clean up unused ReadmeFile interface * dissolve id.ts * test_suite_listing.ts * split params_utils into param_utils + stringify_params * rename encodeURLSelectively again * add query.isMulti{File,Test,Case} * fix gen_wpt_cts_html (at least for the simple mode; advanced mode probably still broken * better run-one icon * standalone: always make the url bar show the complete url * revert tasks.json * fix number out of bounds * don't drop worker results, report input string on all query parse errors * update docs/terms.md * revisions * more revisions * make comparePublicParamsPaths order-agnostic (now allows queries against params out of order, but tree will not reorder itself accordingly) * revise compareQueries, part 1 * revise compareQueries, part 2: compareOneLevel * remove incorrect comment * undo fast-glob dependency * address Austin's comments * address comments * pass debug flag into test worker * typo fixes

view details

Kai Ninomiya

commit sha 0b380062012789052ed123b78422b87ab1675f54

Don't use variants in reftests (#185) Turns out WPT doesn't support test variants in reftests.

view details

Kai Ninomiya

commit sha ca1351128891b2da026d82edc412911256a3ec90

only checkForDuplicateCases during crawl(); slightly speed up comparePublicParamsPaths (#186) * only checkForDuplicateCases during crawl(); slightly speed up comparePublicParamsPaths * use Set * un-delete error message * expand tests, go back to n^2 (instead of Set) to pass tests * more testing, rename method * nit

view details

push time in 3 months

PR closed gpuweb/cts

Index format tests

Add test cases for testing drawIndexed, IndexFormat, Primitive restart

+320 -0

2 comments

5 changed files

haoxli

pr closed time in 3 months

pull request commentgpuweb/cts

Index format tests

OK, close this one.

haoxli

comment created time in 3 months

push eventhaoxli/cts

Li, Hao

commit sha 45b258a4e759c7981bb953c4190991dde10c6061

Index format tests Add test cases for testing drawIndexed, IndexFormat, Primitive restart

view details

push time in 3 months

push eventhaoxli/cts

Li, Hao

commit sha 89422e23b08223e82d08bc5a4edfafeb43770443

Index format tests Add test cases for testing drawIndexed, IndexFormat, Primitive restart

view details

push time in 3 months

PR opened gpuweb/cts

Index format tests

Add test cases for testing drawIndexed, IndexFormat, Primitive restart

+258 -0

0 comment

5 changed files

pr created time in 3 months

push eventhaoxli/cts

Li, Hao

commit sha c94495c7e395b492cfd4514873892172375831d1

Index format tests Add test cases for testing drawIndexed, IndexFormat, Primitive restart

view details

push time in 3 months

create barnchhaoxli/cts

branch : index-format-tests

created branch time in 3 months

fork haoxli/cts

WebGPU Conformance Test Suite

https://gpuweb.github.io/cts/

fork in 3 months

more