Commit Graph

38 Commits

Author SHA1 Message Date
riperiperi
2fb3c6975e Create command buffers when rented rather than in advance (#31)
* Make it less likely to freeze, but the creation of the command buffer should probably be moved

* Create command buffers as they're rented rather than in advance
2024-12-23 21:38:15 -06:00
riperiperi
879c93cf73 Preload command speedup, Texture/buffer data flush, blit shader fix (#30)
* Move encoder state to be tied to command buffer, so preload and background cbs have their own encoder state

* Texture buffer/data flush, blit shader fix
2024-12-23 21:38:13 -06:00
riperiperi
4b53d18bef Fix Geometry/TFB on compute, Buffer Textures, add Window Resizing (#28) 2024-12-23 21:38:00 -06:00
Isaac Marovitz
197184657f Cleanup Pipeline
Housekeeping

More housekeeping
2024-12-23 21:36:44 -06:00
Isaac Marovitz
74083083cd PersistentFlushBuffer + BackgroundResources 2024-12-23 21:36:42 -06:00
Isaac Marovitz
b8779c6e09 Buffer Conversions (#23)
* Why is this not working

* Revert helper shader changes for now

* Byte Index Buffer Restride
2024-12-23 21:35:38 -06:00
Isaac Marovitz
dda746c0fb Metal: Buffers Take 2 (#21)
* Basic BufferManager

* Start Scoped Command Buffers

* Fences stuff

* Remember to cleanup sync manager

* Auto, Command Buffer Dependants

* Cleanup

* Cleanup + Fix Texture->Buffer Copies

* Slow buffer upload

* Cleanup + Rework TextureBuffer

* Don’t get unsafe

* Cleanup

* Goddamn it

* Staging Buffer + Interrupt Action + Flush
2024-12-23 21:35:33 -06:00
Isaac Marovitz
8b5392ce9b Don’t use DidModifyRange 2024-12-23 21:35:17 -06:00
Isaac Marovitz
51b4ffeb6c Disable scaled vertex formats 2024-12-23 21:35:07 -06:00
Isaac Marovitz
39bfd55958 Disable Vector Indexing Bug Workaround 2024-12-23 21:35:04 -06:00
Isaac Marovitz
fe4fa6f4db Cleanup 2024-12-23 21:33:31 -06:00
Isaac Marovitz
02f1e289e2 Rebase Changes 2024-12-23 21:33:19 -06:00
Isaac Marovitz
f00cf8704f Metal: Compute Shaders (#19)
* check for too bix texture bindings

* implement lod query

* print shader stage name

* always have fragment input

* resolve merge conflicts

* fix: lod query

* fix: casting texture coords

* support non-array memories

* use structure types for buffers

* implement compute pipeline cache

* compute dispatch

* improve error message

* rebind compute state

* bind compute textures

* pass local size as an argument to dispatch

* implement texture buffers

* hack: change vertex index to vertex id

* pass support buffer as an argument to every function

* return at the end of function

* fix: certain missing compute bindings

* implement texture base

* improve texture binding system

* remove useless exception

* move texture handle to texture base

* fix: segfault when using disposed textures

---------

Co-authored-by: Samuliak <samuliak77@gmail.com>
Co-authored-by: SamoZ256 <96914946+SamoZ256@users.noreply.github.com>
2024-12-23 21:33:12 -06:00
SamoZ256
6cc4d46e8c Clone the state & flip viewport vertically (#16)
* implement texture get data

* reset all state before blit & clone state

* format

* support blit regions

* implement source region for blit

* replace bottom with top

* account for 0 size

* support image flipping

* revert presentation fixes & y flip

* revert

* flip viewport vertically

* switch face winding

* comment

* use SetBytes for texture clear

* implement missing compute builtins

* change storage and texture buffer alignment

* correct compute builtins

* don't use nullable for textures and samplers

* remove incorrect texture get data implementation

* Cleanup IntPtrs

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-12-23 21:32:34 -06:00
Isaac Marovitz
91aed4d0dd Rebase 2024-12-23 21:29:54 -06:00
Isaac Marovitz
58fb8564a8 Start Proper Dispose 2024-12-23 21:29:47 -06:00
Isaac Marovitz
90e3899c23 Shitty Clears + Inline Buffer Improvements? 2024-12-23 21:29:24 -06:00
Samuliak
7a6c7196c8 fix: incorrect layer count of texture view 2024-12-23 21:28:59 -06:00
Isaac Marovitz
95af212cfc Fix present 2024-12-23 21:26:46 -06:00
Isaac Marovitz
18e1569941 Rebase + Format 2024-12-23 21:23:59 -06:00
Isaac Marovitz
b85721b738 Rebase + GAL Changes 2024-12-23 21:23:06 -06:00
Isaac Marovitz
60c99e32b0 Require Argument Buffers Tier 2 2024-12-23 21:21:42 -06:00
Isaac Marovitz
e353e3d3fc Dispose pipeline before window 2024-12-23 21:19:33 -06:00
Isaac Marovitz
b157a8e549 Revise ISampler 2024-12-23 21:16:20 -06:00
Isaac Marovitz
e8d0212ec6 “Report” Driver 2024-12-23 21:15:18 -06:00
Isaac Marovitz
e7197877a2 Adjust function signature 2024-12-23 21:15:14 -06:00
Isaac Marovitz
dff9046f55 Get it building again 2024-12-23 21:15:07 -06:00
Isaac Marovitz
3398977c97 Implement CreateProgram 2024-12-23 21:08:35 -06:00
Isaac Marovitz
7182ac7233 Get build working again (values likely wrong) 2024-12-23 21:06:45 -06:00
Isaac Marovitz
5a802a550b Fix Metal Validation Error 2024-12-23 21:00:16 -06:00
Isaac Marovitz
8b9d6ffc94 Easier capture stuff 2024-12-23 20:58:47 -06:00
Isaac Marovitz
c1ef270b9d Cleanup encoder getting + Fix capture overflow 2024-12-23 20:58:32 -06:00
Isaac Marovitz
7441d94f10 Formatting 2024-12-23 20:57:31 -06:00
Isaac Marovitz
fb8749ce4e HelperShaders class 2024-12-23 20:53:42 -06:00
Isaac Marovitz
d36c285b79 Undertale boots 2024-12-23 20:53:33 -06:00
Isaac Marovitz
6a115becef Seizure my beloved is working 2024-12-23 20:52:32 -06:00
Isaac Marovitz
93f31bd08a Look ma no crash 2024-12-23 20:44:22 -06:00
Evan Husted
cbad43b003 some initial metal commits cherry-picked 2024-12-23 20:35:49 -06:00