Stephen Gutekanst
c38edecf2f
gpu: add FeatureName enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
45704d990e
gpu: add ErrorType enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
85e431a956
gpu: add ErrorFilter enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
27c4b2a548
gpu: add Device.LostReason enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
089eb3bdda
gpu: make enum namers methods
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
963f06261f
gpu: add CullMode enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
6e0c71f121
gpu: add CreatePipelineAsyncStatus enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
b0682df01b
gpu: add ComputePassTimestampLocation enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
8f28b65fed
gpu: add CompilationMessageType enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
06661ce9e1
gpu: add CompilationInfoRequestStatus enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
3a4abcef6f
gpu: add CompareFunction enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
19425d4f86
gpu: add Buffer.MapAsyncStatus
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
87b06cf373
gpu: add Buffer.BindingType enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
97b21c8ac8
gpu: add BlendOperation enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
8115d0cbf7
gpu: add BlendFactor enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
78685c19a0
gpu: add BackendType enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
8ca3d666a3
gpu: add AlphaMode enum
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
4163005eb5
gpu: ref all decls in test
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
ee65cb286c
gpu: add Sampler.AddressMode
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
af9c01d851
gpu: add Adapter.Type
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
7d2ecdf197
gpu: expose opaque pointer types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
0ae04f1d87
gpu: translate opaque pointer types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
32a26d8f12
gpu: translate constants
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
919499327e
gpu: update README, add TODO-webgpu.h
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
2174936469
gpu: prepare for full-scale rewrite of library
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Ali Chraghi
b500b04c41
all: build: install tests exe
2022-07-25 11:21:37 -07:00
alichraghi
348733867c
gpu: use refAllDeclsRecursive to find and fix mistakes
2022-07-20 18:55:59 -07:00
alichraghi
e6adc3e350
build: add mode paramater to testStep functions
2022-07-20 18:55:59 -07:00
alichraghi
d194dafb79
build: add test-mach step to test src/ and test for testing all sub-projects
2022-07-19 09:25:55 -07:00
dweiller
134c2019b1
gpu: remove Queue.WorkDownCallback lifetime footgun
...
The previous implementation required the specific Queue struct that
submit() was called on to be valid when the callback is triggered. By
storing a pointer instead, the Queue does not need to be valid, only the
callback itself.
2022-06-24 10:14:19 -07:00
kamidev
68190e863a
Change std.build.Pkg.path -> std.build.Pkg.source
...
Fixes breaking change in latest Zig master, see https://github.com/ziglang/zig/pull/11557
2022-05-29 08:25:52 -07:00
Michal Ziulek
f2ab1eb069
gpu: Queue.WorkDoneStatus fields should be snake_case.
2022-05-29 05:26:12 -07:00
Ali Chraghi
b5d10fb167
gpu: taked slice child type in writeTexture
2022-05-24 14:34:13 -07:00
iddev5
66cc8281e5
gpu: Dont link dawn and glfw in wasm32
2022-05-22 11:44:21 -07:00
iddev5
2b994d6b24
gpu: Fix build in 32-bit platforms
...
Because of the use of u64, this currently fails to build in 32-bit
platforms like wasm. usize is platform dependent but safe enough for
most use cases.
2022-05-21 23:00:38 -07:00
Michal Ziulek
5a2aebb14b
gpu: correct sending of pointer to a local var to a callback function ( #271 )
2022-05-08 15:04:25 -07:00
Michal Ziulek
0e64b9608c
gpu: 'dynamic_offsets' should be '?[] const u32' everywhere. ( #260 )
2022-04-30 08:57:10 -07:00
Silver
ea76aa0268
gpu: fix store_op
2022-04-29 13:10:04 -07:00
Stephen Gutekanst
f8e7f96a4a
gpu: correct RenderPassDepthStencilAttachment default values
...
Helps hexops/mach#182
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
821117fb26
gpu: correct TextureView.Descriptor default values
...
Helps hexops/mach#182
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
c535e041bd
gpu: correct default TextureView.Descriptor.format value
...
According to kangz `WGPUTextureFormat_Undefined` is the correct default value for
`TextureView.Descriptor.format`. According to the spec, the default should be the
associated _Texture_'s descriptor.format, but it seems Dawn internally handles
this when set to `Undefined` - we will take the same approach.
https://matrix.to/#/!MFogdGJfnZLrDmgkBN:matrix.org/$eVPXZMzewxJMZ_25K5jVV2N6SVriMUovkfXZI62Kq-k?via=matrix.org&via=mozilla.org&via=zinz.dev
Helps hexops/mach#182
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-22 16:19:02 -07:00
PiergiorgioZagaria
4e3a58897b
gpu: mirror more WebGPU spec default values ( #249 )
...
Helps hexops/mach#182
2022-04-21 18:38:26 -07:00
Stephen Gutekanst
58664afbd6
gpu/examples: zig fmt
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:01:52 -07:00
Michal Ziulek
bd28946397
gpu: Changes needed for latest Dawn (generated-2022-04-18).
2022-04-18 20:45:33 -07:00
PiergiorgioZagaria
169b1e2a42
gpu: correct alignment in pointer casts; handle void Context in all callbacks ( #233 )
...
* Fixed ErrorCallback.init() alignment
* Fixed callbacks alignments
* Fixed more of the callback alignment problems
* Added checks for void Context in callback
2022-04-18 11:38:09 -07:00
Stephen Gutekanst
d664c8e55d
do not produce needless libraries ( #220 )
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 10:32:21 -07:00
d3m1gd
7e8cbc78ff
gpu: fix samler typo ( #224 )
...
Co-authored-by: d3m1gd <mach+d3m1gd@users.noreply.github.com>
2022-04-17 09:15:52 -07:00
d3m1gd
05853da233
gpu: fix alignment issues with getMappedRange, getConstMappedRange ( #223 )
...
fixes alignment issues with getMappedRange, getConstMappedRange
Prior to this change `getMappedRange` and `getConstMappedRange` would not handle alignment to `COPY_BUFFER_ALIGNMENT` for users, and so invocation could result in an unhelpful error message:
```
thread 254201 panic: attempt to use null value
.../mach/gpu/src/NativeInstance.zig:1721:42: 0x480747
in .gpu.NativeInstance.buffer_vtable.getMappedRange (game)
return @ptrCast([*c]u8, range.?)[0..size];
^
```
To address this:
1. Ensure we always request a 4-byte aligned buffer when `createBuffer` is called.
2. Ensure we always map 4-byte aligned buffers.
Co-authored-by: d3m1gd <mach+d3m1gd@users.noreply.github.com>
2022-04-16 10:16:20 -07:00
Andrew Gutekanst
9e945ce951
gpu: improve optional handling
...
Helps hexops/mach#182
2022-04-14 10:46:31 -07:00
Michal Ziulek
fe8e0e7c98
gpu: Add default values for some structs (taken from the spec). ( #218 )
...
Helps hexops/mach#182
2022-04-12 12:09:48 -07:00