Commit Graph

196 Commits

Author SHA1 Message Date
gingerBill 83d63e572a Improve indirect stuff 2022-02-14 16:21:00 +00:00
gingerBill 5212f62f54 Improve many methods with WithDescriptor suffixes 2022-02-14 16:18:23 +00:00
gingerBill 4d0fd4cf19 Correct device() usage 2022-02-14 15:56:32 +00:00
gingerBill e47953f7ca Improve procedure signature and names 2022-02-14 15:45:02 +00:00
gingerBill 47f3773146 Correct Depth classes 2022-02-14 15:18:38 +00:00
gingerBill 31c6ecad34 Correct Counter classes 2022-02-14 15:15:32 +00:00
gingerBill af6e53c05c Improve Compute classes 2022-02-14 15:14:41 +00:00
gingerBill 153140eb8f Improve ComputeCommandEncoder 2022-02-14 14:43:50 +00:00
gingerBill 6fef44c041 Improve CommandEncoder 2022-02-14 14:33:50 +00:00
gingerBill a88d149903 Improve CommandBuffer 2022-02-14 14:33:02 +00:00
gingerBill f9fc488399 Correct CaptureScope 2022-02-14 14:26:35 +00:00
gingerBill bef806bef4 Update Capture Manager classes 2022-02-14 14:24:36 +00:00
gingerBill 95e9bbf99f Improve Buffer 2022-02-14 12:52:30 +00:00
gingerBill 5936fa8871 Correct Blit Pass 2022-02-14 12:46:46 +00:00
gingerBill 02646b789c Correct typo 2022-02-14 12:44:57 +00:00
gingerBill 09e9dca869 Improve BlitCommandEncoder 2022-02-14 12:43:01 +00:00
gingerBill 9a43c0672e Correct BinaryArchive 2022-02-14 12:36:28 +00:00
gingerBill 83a6169463 Update ArgumentEncoder 2022-02-14 12:32:45 +00:00
gingerBill debe2de5fe Correct Acceleration Structure Types 2022-02-14 12:12:23 +00:00
gingerBill ff7d591ebf Correct AccelerationStructure classes 2022-02-14 11:55:59 +00:00
gingerBill 7386ca9272 Add new objc intrinsics: objc_(register|find)_(selector|class) 2022-02-14 11:21:21 +00:00
gingerBill c34ae884ad Change to "object" 2022-02-14 11:04:29 +00:00
gingerBill 2958c1d6aa Add new shorthand 2022-02-13 16:56:27 +00:00
gingerBill 9dc83bc1b3 Add more methods 2022-02-13 16:32:31 +00:00
gingerBill 88b1b2c629 Correct types 2022-02-13 15:11:45 +00:00
gingerBill 23bc643a81 Merge branch 'objc-intrinsics' of https://github.com/odin-lang/Odin into objc-intrinsics 2022-02-13 12:01:19 +00:00
gingerBill 41854bacf5 Add utility classes for dealing with Windows
Most for GLFW and SDL only
2022-02-13 11:54:40 +00:00
gingerBill 8966294823 Correct method name 2022-02-12 22:03:15 +00:00
gingerBill e2aa8f426d Improve type hierarchy and method names 2022-02-12 21:45:34 +00:00
gingerBill 39a0f8c96a Use distinct array types 2022-02-12 21:28:56 +00:00
gingerBill 5fe9aa919b Correct types in methods 2022-02-12 21:24:28 +00:00
gingerBill ff5d6a994b Move vendor:Metal to core:sys/darwin/Metal 2022-02-12 17:59:40 +00:00
gingerBill f8afda3b22 Add more objc attributes 2022-02-11 22:54:51 +00:00
gingerBill c3809d7b84 Fix typo 2022-02-09 21:46:26 +00:00
gingerBill 42a1c58a80 Update Foundation linking 2022-02-09 21:42:20 +00:00
gingerBill b6abaf739c Add missing calls for Object; Add scoped_autoreleasepool 2022-02-09 12:29:52 +00:00
gingerBill ef98e92e8d Remove unneeded file 2022-02-09 12:23:41 +00:00
gingerBill 768c2684d0 Add NSBundle, NSError, NSEnumerator 2022-02-09 12:19:59 +00:00
gingerBill 5f2514db63 Add NSNumber and NSURL 2022-02-09 11:50:11 +00:00
gingerBill b95ade40c0 Begin work on core:sys/darwin/Foundation 2022-02-09 00:19:20 +00:00
Platin21 1243b1a58c Fixed cyclic imports which where not needed 2022-01-23 23:16:57 +01:00
Platin21 ab3bae5c02 Fixed package name 2022-01-23 23:14:46 +01:00
Platin21 540c5400a0 Adds several system calls and the beginning of odin wrappers for them
This also adds all systemcall numbers from the xnu kernel / and additional helpers for some of the calls to make it easier to call them from odin
2022-01-23 23:13:32 +01:00
gingerBill ca33cb990b Strip semicolons in core which were missing 2021-09-08 13:12:38 +01:00
Platin21 a71cbd4087 Changed foreign imports to now use the System Framework 2020-09-27 21:57:27 +03:00
Tetralux 99121d6ff2 Implement core:thread and core:sync on Unix using pthreads
Also do some cleanup and refactoring of the thread, sync and time APIs.

- remove 'semaphore_release' because 'post' and 'wait' is easier to understand

- change 'semaphore_wait' to '*_wait_for' to match Condition

- pthreads can be given a stack, but doing so requires the user to set up the guard
  pages manually. BE WARNED. The alignment requirements of the stack are also
  platform-dependant; it may need to be page size aligned on some systems.
  Unclear which systems, however. See 'os.get_page_size', and 'mem.make_aligned'.
  HOWEVER: I was unable to get custom stacks with guard pages working reliably,
  so while you can do it, the API does not support it.

- add 'os.get_page_size', 'mem.make_aligned', and 'mem.new_aligned'.

- removed thread return values because windows and linux are not consistent; windows returns 'i32'
  and pthreads return 'void*'; besides which, if you really wanted to communicate how the
  thread exited, you probably wouldn't do it with the thread's exit code.

- fixed 'thread.is_done' on Windows; it didn't report true immediately after calling 'thread.join'.

- moved time related stuff out of 'core:os' to 'core:time'.

- add 'mem.align_backward'

- fixed default allocator alignment
  The heap on Windows, and calloc on Linux, both have no facility to request alignment.
  It's a bit of hack, but the heap_allocator now overallocates; `size + alignment` bytes,
  and aligns things to at least 2.
  It does both of these things to ensure that there is at least two bytes before the payload,
  which it uses to store how much padding it needed to insert in order to fulfil the alignment
  requested.

- make conditions more sane by matching the Windows behaviour.
  The fact that they were signalled now lingers until a thread tries to wait,
  causing them to just pass by uninterrupted, without sleeping or locking the
  underlying mutex, as it would otherwise need to do.
  This means that a thread no longer has to be waiting in order to be signalled, which
  avoids timing bugs that causes deadlocks that are hard to debug and fix.
  See the comment on the `sync.Condition.flag` field.

- add thread priority: `thread.create(worker_proc, .High)`
2019-12-01 00:46:23 +00:00