Skip to content

Commit

Permalink
Deploying to gh-pages from @ 372cdb2 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jul 2, 2024
1 parent 88a0d3e commit 182123d
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 52 deletions.
4 changes: 4 additions & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change List

### 1.9.0

* Support `minBindingSize` in bind group layouts.

### 1.8.0

* Support creating 3d textures from images/canvases...
Expand Down
11 changes: 7 additions & 4 deletions dist/1.x/webgpu-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.min.js.map

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions dist/1.x/webgpu-utils.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/1.x/webgpu-utils.module.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/1.x/webgpu-utils.module.min.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/1.x/webgpu-utils.module.min.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- this file is auto-generated from README.md. Do not edited directly -->
<!--
@license webgpu-utils 1.8.2 Copyright (c) 2023, Gregg Tavares All Rights Reserved.
@license webgpu-utils 1.9.0 Copyright (c) 2023, Gregg Tavares All Rights Reserved.
Available via the MIT license.
see: http://github.com/greggman/webgpu-utils for details
-->
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webgpu-utils",
"version": "1.8.2",
"version": "1.9.0",
"description": "webgpu utilities",
"main": "dist/1.x/webgpu-utils.module.js",
"module": "dist/1.x/webgpu-utils.module.js",
Expand Down
20 changes: 0 additions & 20 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,12 @@ export default [
file: `${dist}/webgpu-utils.module.js`,
format: 'esm',
sourcemap: true,
freeze: false,
banner,
},
],
plugins,
...shared,
},
{
input: 'src/webgpu-utils.ts',
output: [
{
file: `${dist}/webgpu-utils.module.min.js`,
format: 'esm',
sourcemap: true,
freeze: false,
banner,
},
],
plugins: [
...plugins,
terser(),
],
...shared,
},
{
input: 'src/webgpu-utils.ts',
output: [
Expand All @@ -58,7 +40,6 @@ export default [
file: `${dist}/webgpu-utils.js`,
format: 'umd',
sourcemap: true,
freeze: false,
banner,
},
],
Expand All @@ -73,7 +54,6 @@ export default [
file: `${dist}/webgpu-utils.min.js`,
format: 'umd',
sourcemap: true,
freeze: false,
banner,
},
],
Expand Down
5 changes: 4 additions & 1 deletion src/data-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,17 @@ function getBindGroupLayoutEntry(resource: VariableInfo, visibility: GPUShaderSt
return {
binding,
visibility,
buffer: { },
buffer: {
...(resource.size && { minBindingSize: resource.size }),
},
};
case ResourceType.Storage:
return {
binding,
visibility,
buffer: {
type: (access === '' || access === 'read') ? 'read-only-storage' : 'storage',
...(resource.size && { minBindingSize: resource.size }),
},
};
case ResourceType.Texture: {
Expand Down
44 changes: 32 additions & 12 deletions test/tests/data-definition-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ describe('data-definition-tests', () => {
@group(0) @binding(5) var texExt: texture_external;
@group(1) @binding(0) var<uniform> u: mat4x4f;
@group(1) @binding(1) var<storage> s: mat4x4f;
@group(1) @binding(2) var<storage, read> sr: mat4x4f;
@group(1) @binding(3) var<storage, read_write> srw: mat4x4f;
@group(1) @binding(2) var<storage, read> sr: array<vec4f, 10>;
@group(1) @binding(3) var<storage, read_write> srw: array<vec4f>;
@group(3) @binding(0) var tsR: texture_storage_2d<rgba8unorm, read>;
@group(3) @binding(1) var tsW: texture_storage_2d<rgba32float, write>;
@group(3) @binding(2) var tsRW: texture_storage_2d<rgba16uint, read_write>;
Expand Down Expand Up @@ -283,21 +283,29 @@ describe('data-definition-tests', () => {
},
"sr": {
"typeDefinition": {
"size": 64,
"type": "mat4x4f",
"size": 160,
"numElements": 10,
"elementType": {
"size": 16,
"type": "vec4f",
},
},
"group": 1,
"binding": 2,
"size": 64,
"size": 160,
},
"srw": {
"typeDefinition": {
"size": 64,
"type": "mat4x4f",
"size": 0,
"numElements": 0,
"elementType": {
"size": 16,
"type": "vec4f",
},
},
"group": 1,
"binding": 3,
"size": 64,
"size": 0,
},
},
"storageTextures": {
Expand Down Expand Up @@ -449,7 +457,9 @@ describe('data-definition-tests', () => {
"entry": {
"binding": 0,
"visibility": 1,
"buffer": {},
"buffer": {
"minBindingSize": 64,
},
},
},
{
Expand All @@ -460,6 +470,7 @@ describe('data-definition-tests', () => {
"visibility": 1,
"buffer": {
"type": "read-only-storage",
"minBindingSize": 64,
},
},
},
Expand All @@ -471,6 +482,7 @@ describe('data-definition-tests', () => {
"visibility": 1,
"buffer": {
"type": "read-only-storage",
"minBindingSize": 160,
},
},
},
Expand Down Expand Up @@ -546,8 +558,8 @@ describe('data-definition-tests', () => {
@group(0) @binding(5) var texExt: texture_external;
@group(1) @binding(0) var<uniform> u: mat4x4f;
@group(1) @binding(1) var<storage> s: mat4x4f;
@group(1) @binding(2) var<storage, read> sr: mat4x4f;
@group(1) @binding(3) var<storage, read_write> srw: mat4x4f;
@group(1) @binding(2) var<storage, read> sr: array<vec4f, 10>;
@group(1) @binding(3) var<storage, read_write> srw: array<vec4f>;
@group(3) @binding(0) var tsR: texture_storage_2d<rgba8unorm, read>;
@group(3) @binding(1) var tsW: texture_storage_2d<rgba32float, write>;
@group(3) @binding(2) var tsRW: texture_storage_2d<rgba16uint, read_write>;
Expand Down Expand Up @@ -630,20 +642,24 @@ describe('data-definition-tests', () => {
{
binding: 0,
visibility: 1,
buffer: {},
buffer: {
minBindingSize: 64,
},
},
{
binding: 1,
visibility: 1,
buffer: {
type: 'read-only-storage',
minBindingSize: 64,
},
},
{
binding: 2,
visibility: 1,
buffer: {
type: 'read-only-storage',
minBindingSize: 160,
},
},
{
Expand Down Expand Up @@ -816,6 +832,7 @@ describe('data-definition-tests', () => {
binding: 1,
visibility: 4,
buffer: {
minBindingSize: 16,
},
},
],
Expand Down Expand Up @@ -858,12 +875,14 @@ describe('data-definition-tests', () => {
binding: 3,
visibility: 4,
buffer: {
minBindingSize: 16,
},
},
{
binding: 4,
visibility: 4,
buffer: {
minBindingSize: 16,
},
},
],
Expand Down Expand Up @@ -899,6 +918,7 @@ describe('data-definition-tests', () => {
binding: 3,
visibility: 1,
buffer: {
minBindingSize: 16,
},
},
],
Expand Down

0 comments on commit 182123d

Please sign in to comment.