Commit graph

479 commits

Author SHA1 Message Date
Stephen Gutekanst
806ec0d147 gpu: add PipelineStatisticName enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
18dd84d6a5 gpu: add LoggingType enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
1aeefec62b gpu: add LoadOp enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
71e6049ada gpu: add IndexFormat enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
6e8e0febdd gpu: add FrontFace enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
3c3a940833 gpu: add FilterMode enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
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