Commit graph

1265 commits

Author SHA1 Message Date
Stephen Gutekanst
a2f65d5a23 gpu-dawn: error if curl is not installed, less verbose errors
Some Linux distro's (e.g. Ubuntu) ship with wget but not curl by default. It's possible
to run into this if you don't use it a lot, e.g. in WSL under Windows - so produce an error
if `curl` is not installed.

Additionally, if the binary download fails, don't throw an entire stack trace to stdout.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-27 12:53:37 -07:00
Stephen Gutekanst
074721ece7
doc: add known issues 2022-03-27 12:03:13 -07:00
Release automation
4d49c673e5 gpu-dawn: update to latest binary release 2022-03-27 06:33:21 +00:00
Stephen Gutekanst
d785e8f2d3 gpu-dawn: make macOS cross compilation errors more helpful
Fixes hexops/mach#187

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 22:44:55 -07:00
Stephen Gutekanst
add120b2a1 gpu-dawn: don't leave binary download cache in bad state if error occurs
Fixes hexops/mach#188

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 22:33:56 -07:00
Release automation
d7230d6b5b gpu-dawn: update to latest binary release 2022-03-26 22:10:27 +00:00
Stephen Gutekanst
a44f91448b gpu-dawn: use versioned python command when bundling releases
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 14:09:17 -07:00
Stephen Gutekanst
128fc0a444 gpu-dawn: update to Zig 0.10.0-dev.1600+af844931b
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:31:34 -07:00
Stephen Gutekanst
0753c5e4c8 glfw: update to Zig 0.10.0-dev.1600+af844931b
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:31:24 -07:00
Stephen Gutekanst
4cde76f5af CI: update to Zig 0.10.0-dev.1600+af844931b
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:31:13 -07:00
Stephen Gutekanst
ed742ec7ca gpu-dawn: CI: use mainline Zig build again for Windows
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:26:26 -07:00
Stephen Gutekanst
2288fa8d78 glfw: CI: windows: disable progress bar for faster downloads
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:25:56 -07:00
Stephen Gutekanst
d2a2ee8022 CI: windows: disable progress bar for faster downloads
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-26 13:25:46 -07:00
Andrew Gutekanst
8072839973 gpu: update GetModuleHandleW usage in examples 2022-03-19 18:01:41 -07:00
Release automation
fc2c0c0ff8 gpu-dawn: update to latest binary release 2022-03-19 21:37:20 +00:00
Stephen Gutekanst
7060343f42 gpu-dawn: mention Dawn license is permissive
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 13:51:50 -07:00
Stephen Gutekanst
0ef13eb1cc ecs: third major redesign/rethink of implementation
In the past:

* hexops/mach#156 was the initial ECS implementation detailed in https://devlog.hexops.com/2022/lets-build-ecs-part-1
* hexops/mach#157 was the second major redesign in which we:
    * Eliminated major limitations (e.g. inability to add/remove components at runtime)
    * Investigated sparse sets
    * Began thinking in terms of databases
    * Enabled runtime introspection

Our second revision of the ECS, however, still had _archetypes_ exposed as a public-facing
user concern. When a new component was added to an entity, say a weapon, the table storing
entities of that archetype changed to effectively have a new column `?Weapon` with a null
value for _all existing entities of that archetype_. We can say that our ECS had archetypes
as a user-facing concern AND this made performance worse: when iterating all entities with
a weapon, we needed to check if the component value was `null` or not because every column
was `?Weapon` instead of a guaranteed non-null value like `Weapon`. This was a key learning
that I got from [discussing ECS tradeoffs with the Bevy team](https://github.com/hexops/mach/pull/157#issuecomment-1022916117).

This third revision of our ECS has some big benefits:

* Entities are now just IDs proper, you can add/remove arbitrary components at runtime.
    * You don't have an "entity which always belongs to one archetype table which changes"
    * Rather, you have an "entity of one archetype" and adding a component means that entity _moves_ from one archetype table to another.
    * Archetypes are now an implementation detail, not something you worry about as a consumer of the API.
* Performance
    * We benefit from the fact that we no longer need check if a component on an entity is `null` or not.
* Introspection
    * Previously iterating the component names/values an entity had was not possible, now it is.
* Querying & multi-threading
    * Very very early stages into this, but we now have a general plan for how querying will work and multi-threading.
    * Effectively, it will look much like interfacing with a database: you have a connection (we call it an adapter)
      and you can ask for information through that. More work to be done here.
* Systems, we now have a (very) basic starting point for how systems will work.

Some examples of how the API looks today:

* 979240135b/ecs/src/main.zig (L49)
* 979240135b/ecs/src/entities.zig (L625-L656)

Much more work to do, I will do a blog post detailing this step-by-step first though.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 10:59:26 -07:00
Release automation
1428569e66 gpu-dawn: update to latest binary release 2022-03-19 15:19:45 +00:00
Release automation
42b1501ca9 gpu-dawn: update to latest binary release 2022-03-19 15:07:26 +00:00
BratishkaErik
1838faf3f9
glfw: add instructions for Gyro in README.md (#184)
* glfw: add instructions for Gyro in README.md
2022-03-19 07:43:23 -07:00
Stephen Gutekanst
141442d5cb gpu-dawn: README: make note of msvc target
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 07:18:35 -07:00
Stephen Gutekanst
bdc556f9d5 gpu: README: correct links to issue tracker / subproject
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 07:05:42 -07:00
Stephen Gutekanst
a521a4707a gpu-dawn: README: various cleanup & polishing
Fixes hexops/mach#178

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 07:05:04 -07:00
Stephen Gutekanst
82f8113dcb gpu: README: further update TODO list
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
689f2b5122 gpu: example: change window title to "mach/gpu window"
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
fa9b5f1d5d gpu: example: reenable uncaptured error handling
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
5c7691c4ba gpu: fix issue in getting adapter/device limits
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
79d27b82be gpu: enable void callback contexts
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
1717c684de gpu: expose [Error/Logging]Callback
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
64853f5679 gpu: README: cleanup & clarify state of things today
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
6eadeddaf6 gpu: README: add learning resources
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
991c88d851 gpu: implement Queue.writeTexture
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
67a0f60a68 gpu: fix writeBuffer data lengths
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
eacee682ca gpu: implement Queue.writeBuffer
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
0aad5812b8 gpu: implement RenderPassEncoder.Descriptor.timestamp_writes
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
be6e7be247 gpu: remove Dawn-specific TODO
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
cfc9708b37 gpu: update remaining TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
cc7aa3a49a gpu: remove needless Limits conversion
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
f79c77af99 gpu: make Buffer mapped ranges generic / typed
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
05d1eeb9ee gpu: implement basic Buffer .getConstMappedRange, .getMappedRange
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
1209cb590d gpu: implement CommandEncoder.writeBuffer
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
9f1775aa7c gpu: correct feature storage location
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
653c528441 gpu: implement Device.features, Device.limits
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
667539c255 gpu: implement Adapter.features, Adapter.limits
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
12a0772654 gpu: implement Device.hasFeature
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
37d8113e24 gpu: prepare Device limits/features
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
e7526a868d gpu: implement Device.setLoggingCallback
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
a0d28a74b0 gpu: implement Device.setLostCallback
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
672b3a5601 gpu: implement Device.setUncapturedErrorCallback
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
8df0c70c69 gpu: implement Device.popErrorScope
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00