gpu: update translation guidelines

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 19:43:19 -07:00 committed by Stephen Gutekanst
parent 991887fc67
commit ae3137cb98

View file

@ -108,4 +108,5 @@ The rules for translating `webgpu.h` are as follows:
* `BC5RGUnorm -> bc5_rg_unorm` * `BC5RGUnorm -> bc5_rg_unorm`
* `BC6HRGBUfloat -> bc6_hrgb_ufloat` * `BC6HRGBUfloat -> bc6_hrgb_ufloat`
* `ASTC4x4UnormSrgb -> astc4x4_unorm_srgb` * `ASTC4x4UnormSrgb -> astc4x4_unorm_srgb`
* `maxTextureDimension3D -> max_texture_dimension_3d`
* Sometimes an enum will begin with numbers, e.g. `WGPUTextureViewDimension_2DArray`. In this case, we add a prefix so instead of the enum field being `2d_array` it is `dimension_2d_array` (an enum field name must not start with a number in Zig.) * Sometimes an enum will begin with numbers, e.g. `WGPUTextureViewDimension_2DArray`. In this case, we add a prefix so instead of the enum field being `2d_array` it is `dimension_2d_array` (an enum field name must not start with a number in Zig.)