Skip to content

build(deps): bump @webgpu/types from 0.1.54 to 0.1.63 #1435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 106 additions & 100 deletions packages/typegpu/src/core/texture/textureFormats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,101 +12,107 @@ import type { Default } from '../../shared/utilityTypes.ts';
import type { TextureProps } from './textureProps.ts';

export const texelFormatToChannelType = {
r8unorm: f32 as F32,
r8snorm: f32 as F32,
r8uint: u32 as U32,
r8sint: i32 as I32,
r16uint: u32 as U32,
r16sint: i32 as I32,
r16float: f32 as F32,
rg8unorm: f32 as F32,
rg8snorm: f32 as F32,
rg8uint: u32 as U32,
rg8sint: i32 as I32,
r32uint: u32 as U32,
r32sint: i32 as I32,
r32float: f32 as F32,
rg16uint: u32 as U32,
rg16sint: i32 as I32,
rg16float: f32 as F32,
rgba8unorm: f32 as F32,
'rgba8unorm-srgb': f32 as F32,
rgba8snorm: f32 as F32,
rgba8uint: u32 as U32,
rgba8sint: i32 as I32,
bgra8unorm: f32 as F32,
'bgra8unorm-srgb': f32 as F32,
rgb9e5ufloat: f32 as F32,
rgb10a2uint: u32 as U32,
rgb10a2unorm: f32 as F32,
rg11b10ufloat: f32 as F32,
rg32uint: u32 as U32,
rg32sint: i32 as I32,
rg32float: f32 as F32,
rgba16uint: u32 as U32,
rgba16sint: i32 as I32,
rgba16float: f32 as F32,
rgba32uint: u32 as U32,
rgba32sint: i32 as I32,
rgba32float: f32 as F32,
stencil8: f32 as F32, // NOTE: Honestly have no idea if this is right
depth16unorm: f32 as F32,
depth24plus: f32 as F32, // NOTE: Honestly have no idea if this is right
'depth24plus-stencil8': f32 as F32, // NOTE: Honestly have no idea if this is right
depth32float: f32 as F32,
'depth32float-stencil8': f32 as F32,
'bc1-rgba-unorm': f32 as F32,
'bc1-rgba-unorm-srgb': f32 as F32,
'bc2-rgba-unorm': f32 as F32,
'bc2-rgba-unorm-srgb': f32 as F32,
'bc3-rgba-unorm': f32 as F32,
'bc3-rgba-unorm-srgb': f32 as F32,
'bc4-r-unorm': f32 as F32,
'bc4-r-snorm': f32 as F32,
'bc5-rg-unorm': f32 as F32,
'bc5-rg-snorm': f32 as F32,
'bc6h-rgb-ufloat': f32 as F32,
'bc6h-rgb-float': f32 as F32,
'bc7-rgba-unorm': f32 as F32,
'bc7-rgba-unorm-srgb': f32 as F32,
'etc2-rgb8unorm': f32 as F32,
'etc2-rgb8unorm-srgb': f32 as F32,
'etc2-rgb8a1unorm': f32 as F32,
'etc2-rgb8a1unorm-srgb': f32 as F32,
'etc2-rgba8unorm': f32 as F32,
'etc2-rgba8unorm-srgb': f32 as F32,
'eac-r11unorm': f32 as F32,
'eac-r11snorm': f32 as F32,
'eac-rg11unorm': f32 as F32,
'eac-rg11snorm': f32 as F32,
'astc-4x4-unorm': f32 as F32,
'astc-4x4-unorm-srgb': f32 as F32,
'astc-5x4-unorm': f32 as F32,
'astc-5x4-unorm-srgb': f32 as F32,
'astc-5x5-unorm': f32 as F32,
'astc-5x5-unorm-srgb': f32 as F32,
'astc-6x5-unorm': f32 as F32,
'astc-6x5-unorm-srgb': f32 as F32,
'astc-6x6-unorm': f32 as F32,
'astc-6x6-unorm-srgb': f32 as F32,
'astc-8x5-unorm': f32 as F32,
'astc-8x5-unorm-srgb': f32 as F32,
'astc-8x6-unorm': f32 as F32,
'astc-8x6-unorm-srgb': f32 as F32,
'astc-8x8-unorm': f32 as F32,
'astc-8x8-unorm-srgb': f32 as F32,
'astc-10x5-unorm': f32 as F32,
'astc-10x5-unorm-srgb': f32 as F32,
'astc-10x6-unorm': f32 as F32,
'astc-10x6-unorm-srgb': f32 as F32,
'astc-10x8-unorm': f32 as F32,
'astc-10x8-unorm-srgb': f32 as F32,
'astc-10x10-unorm': f32 as F32,
'astc-10x10-unorm-srgb': f32 as F32,
'astc-12x10-unorm': f32 as F32,
'astc-12x10-unorm-srgb': f32 as F32,
'astc-12x12-unorm': f32 as F32,
'astc-12x12-unorm-srgb': f32 as F32,
r8unorm: f32,
r8snorm: f32,
r8uint: u32,
r8sint: i32,
r16uint: u32,
r16sint: i32,
r16float: f32,
rg8unorm: f32,
rg8snorm: f32,
rg8uint: u32,
rg8sint: i32,
r32uint: u32,
r32sint: i32,
r32float: f32,
rg16uint: u32,
rg16sint: i32,
rg16float: f32,
rgba8unorm: f32,
'rgba8unorm-srgb': f32,
rgba8snorm: f32,
rgba8uint: u32,
rgba8sint: i32,
bgra8unorm: f32,
'bgra8unorm-srgb': f32,
rgb9e5ufloat: f32,
rgb10a2uint: u32,
rgb10a2unorm: f32,
rg11b10ufloat: f32,
rg32uint: u32,
rg32sint: i32,
rg32float: f32,
rgba16uint: u32,
rgba16sint: i32,
rgba16float: f32,
rgba32uint: u32,
rgba32sint: i32,
rgba32float: f32,
stencil8: f32, // NOTE: Honestly have no idea if this is right
depth16unorm: f32,
depth24plus: f32, // NOTE: Honestly have no idea if this is right
'depth24plus-stencil8': f32, // NOTE: Honestly have no idea if this is right
depth32float: f32,
'depth32float-stencil8': f32,
'bc1-rgba-unorm': f32,
'bc1-rgba-unorm-srgb': f32,
'bc2-rgba-unorm': f32,
'bc2-rgba-unorm-srgb': f32,
'bc3-rgba-unorm': f32,
'bc3-rgba-unorm-srgb': f32,
'bc4-r-unorm': f32,
'bc4-r-snorm': f32,
'bc5-rg-unorm': f32,
'bc5-rg-snorm': f32,
'bc6h-rgb-ufloat': f32,
'bc6h-rgb-float': f32,
'bc7-rgba-unorm': f32,
'bc7-rgba-unorm-srgb': f32,
'etc2-rgb8unorm': f32,
'etc2-rgb8unorm-srgb': f32,
'etc2-rgb8a1unorm': f32,
'etc2-rgb8a1unorm-srgb': f32,
'etc2-rgba8unorm': f32,
'etc2-rgba8unorm-srgb': f32,
'eac-r11unorm': f32,
'eac-r11snorm': f32,
'eac-rg11unorm': f32,
'eac-rg11snorm': f32,
'astc-4x4-unorm': f32,
'astc-4x4-unorm-srgb': f32,
'astc-5x4-unorm': f32,
'astc-5x4-unorm-srgb': f32,
'astc-5x5-unorm': f32,
'astc-5x5-unorm-srgb': f32,
'astc-6x5-unorm': f32,
'astc-6x5-unorm-srgb': f32,
'astc-6x6-unorm': f32,
'astc-6x6-unorm-srgb': f32,
'astc-8x5-unorm': f32,
'astc-8x5-unorm-srgb': f32,
'astc-8x6-unorm': f32,
'astc-8x6-unorm-srgb': f32,
'astc-8x8-unorm': f32,
'astc-8x8-unorm-srgb': f32,
'astc-10x5-unorm': f32,
'astc-10x5-unorm-srgb': f32,
'astc-10x6-unorm': f32,
'astc-10x6-unorm-srgb': f32,
'astc-10x8-unorm': f32,
'astc-10x8-unorm-srgb': f32,
'astc-10x10-unorm': f32,
'astc-10x10-unorm-srgb': f32,
'astc-12x10-unorm': f32,
'astc-12x10-unorm-srgb': f32,
'astc-12x12-unorm': f32,
'astc-12x12-unorm-srgb': f32,
'r16snorm': f32,
'r16unorm': f32,
'rg16unorm': f32,
'rg16snorm': f32,
'rgba16unorm': f32,
'rgba16snorm': f32,
Comment on lines +110 to +115
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added these new formats

} satisfies Record<GPUTextureFormat, U32 | I32 | F32>;

export type TexelFormatToChannelType = typeof texelFormatToChannelType;
Expand Down Expand Up @@ -192,11 +198,11 @@ export const channelKindToFormat = {
} as const;

export const channelFormatToSchema = {
float: f32 as F32,
'unfilterable-float': f32 as F32,
uint: u32 as U32,
sint: i32 as I32,
depth: f32 as F32, // I guess?
float: f32,
'unfilterable-float': f32,
uint: u32,
sint: i32,
depth: f32, // I guess?
};
export type ChannelFormatToSchema = typeof channelFormatToSchema;

Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ catalog:
typescript: ^5.8.2
tsup: ^8.5.0
unbuild: ^3.5.0
'@webgpu/types': ^0.1.54
'@webgpu/types': ^0.1.63
vitest: ^3.2.4