Skip to content

Commit 240f4d1

Browse files
build(deps): bump @webgpu/types from 0.1.54 to 0.1.63 (#1435)
* build(deps): bump @webgpu/types from 0.1.54 to 0.1.63 --- updated-dependencies: - dependency-name: "@webgpu/types" dependency-version: 0.1.63 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * New texture formats --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Iwo Plaza <[email protected]>
1 parent f43b7f1 commit 240f4d1

File tree

3 files changed

+118
-112
lines changed

3 files changed

+118
-112
lines changed

packages/typegpu/src/core/texture/textureFormats.ts

Lines changed: 106 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -12,101 +12,107 @@ import type { Default } from '../../shared/utilityTypes.ts';
1212
import type { TextureProps } from './textureProps.ts';
1313

1414
export const texelFormatToChannelType = {
15-
r8unorm: f32 as F32,
16-
r8snorm: f32 as F32,
17-
r8uint: u32 as U32,
18-
r8sint: i32 as I32,
19-
r16uint: u32 as U32,
20-
r16sint: i32 as I32,
21-
r16float: f32 as F32,
22-
rg8unorm: f32 as F32,
23-
rg8snorm: f32 as F32,
24-
rg8uint: u32 as U32,
25-
rg8sint: i32 as I32,
26-
r32uint: u32 as U32,
27-
r32sint: i32 as I32,
28-
r32float: f32 as F32,
29-
rg16uint: u32 as U32,
30-
rg16sint: i32 as I32,
31-
rg16float: f32 as F32,
32-
rgba8unorm: f32 as F32,
33-
'rgba8unorm-srgb': f32 as F32,
34-
rgba8snorm: f32 as F32,
35-
rgba8uint: u32 as U32,
36-
rgba8sint: i32 as I32,
37-
bgra8unorm: f32 as F32,
38-
'bgra8unorm-srgb': f32 as F32,
39-
rgb9e5ufloat: f32 as F32,
40-
rgb10a2uint: u32 as U32,
41-
rgb10a2unorm: f32 as F32,
42-
rg11b10ufloat: f32 as F32,
43-
rg32uint: u32 as U32,
44-
rg32sint: i32 as I32,
45-
rg32float: f32 as F32,
46-
rgba16uint: u32 as U32,
47-
rgba16sint: i32 as I32,
48-
rgba16float: f32 as F32,
49-
rgba32uint: u32 as U32,
50-
rgba32sint: i32 as I32,
51-
rgba32float: f32 as F32,
52-
stencil8: f32 as F32, // NOTE: Honestly have no idea if this is right
53-
depth16unorm: f32 as F32,
54-
depth24plus: f32 as F32, // NOTE: Honestly have no idea if this is right
55-
'depth24plus-stencil8': f32 as F32, // NOTE: Honestly have no idea if this is right
56-
depth32float: f32 as F32,
57-
'depth32float-stencil8': f32 as F32,
58-
'bc1-rgba-unorm': f32 as F32,
59-
'bc1-rgba-unorm-srgb': f32 as F32,
60-
'bc2-rgba-unorm': f32 as F32,
61-
'bc2-rgba-unorm-srgb': f32 as F32,
62-
'bc3-rgba-unorm': f32 as F32,
63-
'bc3-rgba-unorm-srgb': f32 as F32,
64-
'bc4-r-unorm': f32 as F32,
65-
'bc4-r-snorm': f32 as F32,
66-
'bc5-rg-unorm': f32 as F32,
67-
'bc5-rg-snorm': f32 as F32,
68-
'bc6h-rgb-ufloat': f32 as F32,
69-
'bc6h-rgb-float': f32 as F32,
70-
'bc7-rgba-unorm': f32 as F32,
71-
'bc7-rgba-unorm-srgb': f32 as F32,
72-
'etc2-rgb8unorm': f32 as F32,
73-
'etc2-rgb8unorm-srgb': f32 as F32,
74-
'etc2-rgb8a1unorm': f32 as F32,
75-
'etc2-rgb8a1unorm-srgb': f32 as F32,
76-
'etc2-rgba8unorm': f32 as F32,
77-
'etc2-rgba8unorm-srgb': f32 as F32,
78-
'eac-r11unorm': f32 as F32,
79-
'eac-r11snorm': f32 as F32,
80-
'eac-rg11unorm': f32 as F32,
81-
'eac-rg11snorm': f32 as F32,
82-
'astc-4x4-unorm': f32 as F32,
83-
'astc-4x4-unorm-srgb': f32 as F32,
84-
'astc-5x4-unorm': f32 as F32,
85-
'astc-5x4-unorm-srgb': f32 as F32,
86-
'astc-5x5-unorm': f32 as F32,
87-
'astc-5x5-unorm-srgb': f32 as F32,
88-
'astc-6x5-unorm': f32 as F32,
89-
'astc-6x5-unorm-srgb': f32 as F32,
90-
'astc-6x6-unorm': f32 as F32,
91-
'astc-6x6-unorm-srgb': f32 as F32,
92-
'astc-8x5-unorm': f32 as F32,
93-
'astc-8x5-unorm-srgb': f32 as F32,
94-
'astc-8x6-unorm': f32 as F32,
95-
'astc-8x6-unorm-srgb': f32 as F32,
96-
'astc-8x8-unorm': f32 as F32,
97-
'astc-8x8-unorm-srgb': f32 as F32,
98-
'astc-10x5-unorm': f32 as F32,
99-
'astc-10x5-unorm-srgb': f32 as F32,
100-
'astc-10x6-unorm': f32 as F32,
101-
'astc-10x6-unorm-srgb': f32 as F32,
102-
'astc-10x8-unorm': f32 as F32,
103-
'astc-10x8-unorm-srgb': f32 as F32,
104-
'astc-10x10-unorm': f32 as F32,
105-
'astc-10x10-unorm-srgb': f32 as F32,
106-
'astc-12x10-unorm': f32 as F32,
107-
'astc-12x10-unorm-srgb': f32 as F32,
108-
'astc-12x12-unorm': f32 as F32,
109-
'astc-12x12-unorm-srgb': f32 as F32,
15+
r8unorm: f32,
16+
r8snorm: f32,
17+
r8uint: u32,
18+
r8sint: i32,
19+
r16uint: u32,
20+
r16sint: i32,
21+
r16float: f32,
22+
rg8unorm: f32,
23+
rg8snorm: f32,
24+
rg8uint: u32,
25+
rg8sint: i32,
26+
r32uint: u32,
27+
r32sint: i32,
28+
r32float: f32,
29+
rg16uint: u32,
30+
rg16sint: i32,
31+
rg16float: f32,
32+
rgba8unorm: f32,
33+
'rgba8unorm-srgb': f32,
34+
rgba8snorm: f32,
35+
rgba8uint: u32,
36+
rgba8sint: i32,
37+
bgra8unorm: f32,
38+
'bgra8unorm-srgb': f32,
39+
rgb9e5ufloat: f32,
40+
rgb10a2uint: u32,
41+
rgb10a2unorm: f32,
42+
rg11b10ufloat: f32,
43+
rg32uint: u32,
44+
rg32sint: i32,
45+
rg32float: f32,
46+
rgba16uint: u32,
47+
rgba16sint: i32,
48+
rgba16float: f32,
49+
rgba32uint: u32,
50+
rgba32sint: i32,
51+
rgba32float: f32,
52+
stencil8: f32, // NOTE: Honestly have no idea if this is right
53+
depth16unorm: f32,
54+
depth24plus: f32, // NOTE: Honestly have no idea if this is right
55+
'depth24plus-stencil8': f32, // NOTE: Honestly have no idea if this is right
56+
depth32float: f32,
57+
'depth32float-stencil8': f32,
58+
'bc1-rgba-unorm': f32,
59+
'bc1-rgba-unorm-srgb': f32,
60+
'bc2-rgba-unorm': f32,
61+
'bc2-rgba-unorm-srgb': f32,
62+
'bc3-rgba-unorm': f32,
63+
'bc3-rgba-unorm-srgb': f32,
64+
'bc4-r-unorm': f32,
65+
'bc4-r-snorm': f32,
66+
'bc5-rg-unorm': f32,
67+
'bc5-rg-snorm': f32,
68+
'bc6h-rgb-ufloat': f32,
69+
'bc6h-rgb-float': f32,
70+
'bc7-rgba-unorm': f32,
71+
'bc7-rgba-unorm-srgb': f32,
72+
'etc2-rgb8unorm': f32,
73+
'etc2-rgb8unorm-srgb': f32,
74+
'etc2-rgb8a1unorm': f32,
75+
'etc2-rgb8a1unorm-srgb': f32,
76+
'etc2-rgba8unorm': f32,
77+
'etc2-rgba8unorm-srgb': f32,
78+
'eac-r11unorm': f32,
79+
'eac-r11snorm': f32,
80+
'eac-rg11unorm': f32,
81+
'eac-rg11snorm': f32,
82+
'astc-4x4-unorm': f32,
83+
'astc-4x4-unorm-srgb': f32,
84+
'astc-5x4-unorm': f32,
85+
'astc-5x4-unorm-srgb': f32,
86+
'astc-5x5-unorm': f32,
87+
'astc-5x5-unorm-srgb': f32,
88+
'astc-6x5-unorm': f32,
89+
'astc-6x5-unorm-srgb': f32,
90+
'astc-6x6-unorm': f32,
91+
'astc-6x6-unorm-srgb': f32,
92+
'astc-8x5-unorm': f32,
93+
'astc-8x5-unorm-srgb': f32,
94+
'astc-8x6-unorm': f32,
95+
'astc-8x6-unorm-srgb': f32,
96+
'astc-8x8-unorm': f32,
97+
'astc-8x8-unorm-srgb': f32,
98+
'astc-10x5-unorm': f32,
99+
'astc-10x5-unorm-srgb': f32,
100+
'astc-10x6-unorm': f32,
101+
'astc-10x6-unorm-srgb': f32,
102+
'astc-10x8-unorm': f32,
103+
'astc-10x8-unorm-srgb': f32,
104+
'astc-10x10-unorm': f32,
105+
'astc-10x10-unorm-srgb': f32,
106+
'astc-12x10-unorm': f32,
107+
'astc-12x10-unorm-srgb': f32,
108+
'astc-12x12-unorm': f32,
109+
'astc-12x12-unorm-srgb': f32,
110+
'r16snorm': f32,
111+
'r16unorm': f32,
112+
'rg16unorm': f32,
113+
'rg16snorm': f32,
114+
'rgba16unorm': f32,
115+
'rgba16snorm': f32,
110116
} satisfies Record<GPUTextureFormat, U32 | I32 | F32>;
111117

112118
export type TexelFormatToChannelType = typeof texelFormatToChannelType;
@@ -192,11 +198,11 @@ export const channelKindToFormat = {
192198
} as const;
193199

194200
export const channelFormatToSchema = {
195-
float: f32 as F32,
196-
'unfilterable-float': f32 as F32,
197-
uint: u32 as U32,
198-
sint: i32 as I32,
199-
depth: f32 as F32, // I guess?
201+
float: f32,
202+
'unfilterable-float': f32,
203+
uint: u32,
204+
sint: i32,
205+
depth: f32, // I guess?
200206
};
201207
export type ChannelFormatToSchema = typeof channelFormatToSchema;
202208

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ catalog:
77
typescript: ^5.8.2
88
tsup: ^8.5.0
99
unbuild: ^3.5.0
10-
'@webgpu/types': ^0.1.54
10+
'@webgpu/types': ^0.1.63
1111
vitest: ^3.2.4

0 commit comments

Comments
 (0)