Commit Graph

4069 Commits

Author SHA1 Message Date
Isaac Marovitz 24ab7788d8 Fix 3D -> 3D Texture Copies 2024-12-23 21:34:57 -06:00
Isaac Marovitz 9ab2cd94c1 Fix Clear Viewport 2024-12-23 21:34:55 -06:00
Isaac Marovitz 4ee4e09358 Fix sample-less reads with lod 2024-12-23 21:34:52 -06:00
Isaac Marovitz a07975afec Fix Pack and UnpackHalf2x16 2024-12-23 21:34:50 -06:00
Isaac Marovitz 746c897206 Handle Array Format SetData 2024-12-23 21:34:48 -06:00
Isaac Marovitz fe4fa6f4db Cleanup 2024-12-23 21:33:31 -06:00
Isaac Marovitz db24e0f6fe Implement IoVariable.FrontFacing 2024-12-23 21:33:24 -06:00
Isaac Marovitz e9aee16a27 Fix LOD sample typo 2024-12-23 21:33:21 -06:00
Isaac Marovitz 02f1e289e2 Rebase Changes 2024-12-23 21:33:19 -06:00
Isaac Marovitz 9ebf82f184 More cleanup 2024-12-23 21:33:17 -06:00
Isaac Marovitz 49e83335d1 Cleanup + Format 2024-12-23 21:33:14 -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
Isaac Marovitz 65da0569a3 Handle stride 0 on regular buffers 2024-12-23 21:33:09 -06:00
Isaac Marovitz d811532a9f Buffer Descriptor Step Functions 2024-12-23 21:33:07 -06:00
Isaac Marovitz a42c66e6d5 Sample LOD Level 2024-12-23 21:33:01 -06:00
Isaac Marovitz 8be6b671b8 Fix FragmentOutputColor Type 2024-12-23 21:32:59 -06:00
Isaac Marovitz 2e99df371f Stencil Ref Value 2024-12-23 21:32:56 -06:00
Isaac Marovitz ac8af32744 Stencil Fixes 2024-12-23 21:32:54 -06:00
Isaac Marovitz a58568d036 RenderTargetColorMasks 2024-12-23 21:32:52 -06:00
Isaac Marovitz 7ed45d12db Make dotnet format happy 2024-12-23 21:32:50 -06:00
SamoZ256 505f830556 Zero vertex buffer (#17)
* cast src size to float

* implement zero buffers
2024-12-23 21:32:47 -06:00
Isaac Marovitz 43ad627d4f Implement Texture CopyTo 2024-12-23 21:32:45 -06:00
Isaac Marovitz c5cca8a1a3 Cleanup present 2024-12-23 21:32:43 -06:00
Isaac Marovitz f7941a0a8b Metal: Advanced Present (#6)
* Initial DrawTexture support & Advanced Present

* TODO: Get Scissors Working

* Chnage scissor state management

* Rebase problems…

* Rebase fixes again

* Update DrawTexture + Fix Topology

* Fix flipping

* Add clear action support

* Cleanup
2024-12-23 21:32:40 -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
SamoZ256 18b852e05d Fix Scott Pilgrim (#15)
* check for null vertex functions

* format

* Format

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-12-23 21:32:02 -06:00
Isaac Marovitz 41e6a04a23 Suppress GC Finalize on StateCache 2024-12-23 21:31:59 -06:00
Isaac Marovitz 881ab59177 Use Stack instead of List 2024-12-23 21:31:57 -06:00
Isaac Marovitz 327c1576f7 Whitespace formatting 2024-12-23 21:31:54 -06:00
Samuliak 60ece6d9a1 dispose all temporary buffers 2024-12-23 21:31:52 -06:00
Samuliak 58b42a1143 dispose temporary metal buffer 2024-12-23 21:31:47 -06:00
Samuliak 3be47ae4a9 dispose drawable texture view 2024-12-23 21:31:41 -06:00
Samuliak 6ab989ac54 implement texture get data 2024-12-23 21:31:36 -06:00
Samuliak 9f01cce95f fix: don't dispose stencil state before using 2024-12-23 21:31:30 -06:00
Samuliak 0abbbdc277 allow null depth stencil render targets 2024-12-23 21:31:28 -06:00
Samuliak eb7ec713ec reset certain state before doing blit or clear 2024-12-23 21:31:26 -06:00
Samuliak d5437f3dbf reset viewport before blit 2024-12-23 21:31:24 -06:00
Samuliak 1c4e527ac2 dispose encoder state manager 2024-12-23 21:31:01 -06:00
Samuliak af341f88df dispose all objects in encoder state manager 2024-12-23 21:30:58 -06:00
Samuliak 1ff81393be dispose caches 2024-12-23 21:30:55 -06:00
Samuliak 2cb5265c8e warn about barriers 2024-12-23 21:30:53 -06:00
Samuliak 78553f31d9 do memory barriers 2024-12-23 21:30:50 -06:00
Samuliak 60084f826e remove useless parameters 2024-12-23 21:30:48 -06:00
Samuliak 280efb2ed6 set the inline state after restoring state 2024-12-23 21:30:46 -06:00
Samuliak 14607f4471 make states private 2024-12-23 21:30:41 -06:00
Samuliak fd4fe01348 fix: incorrect merge stuff 2024-12-23 21:30:39 -06:00
Samuliak 8f91b556af don't interrupt render pass before color clear 2024-12-23 21:30:29 -06:00
Samuliak 305a703d4a implement save and restore state system 2024-12-23 21:30:22 -06:00
Samuliak a2c0c11380 revert deferred clears 2024-12-23 21:30:02 -06:00
Samuliak 016df3b050 prepare for deferred clears 2024-12-23 21:29:58 -06:00