Commit Graph

3701 Commits

Author SHA1 Message Date
Isaac Marovitz
d323a8d44a Rebase Changes 2024-09-28 19:03:01 -04:00
Isaac Marovitz
ba07a8c603 More cleanup 2024-09-28 19:03:01 -04:00
Isaac Marovitz
362746887e Cleanup + Format 2024-09-28 19:03:01 -04:00
Isaac Marovitz
b064d76a4f 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-09-28 19:03:01 -04:00
Isaac Marovitz
131ab75d55 Handle stride 0 on regular buffers 2024-09-28 19:03:01 -04:00
Isaac Marovitz
65149cfe9f Buffer Descriptor Step Functions 2024-09-28 19:03:01 -04:00
Isaac Marovitz
a435d94fae Sample LOD Level 2024-09-28 19:03:01 -04:00
Isaac Marovitz
88dd2984be Fix FragmentOutputColor Type 2024-09-28 19:03:01 -04:00
Isaac Marovitz
43460186a8 Stencil Ref Value 2024-09-28 19:03:01 -04:00
Isaac Marovitz
0a6f11d247 Stencil Fixes 2024-09-28 19:03:01 -04:00
Isaac Marovitz
1b86360a61 RenderTargetColorMasks 2024-09-28 19:03:01 -04:00
Isaac Marovitz
dc01de61cd Make dotnet format happy 2024-09-28 19:03:01 -04:00
SamoZ256
e423f81155 Zero vertex buffer (#17)
* cast src size to float

* implement zero buffers
2024-09-28 19:03:01 -04:00
Isaac Marovitz
35f68c1b31 Implement Texture CopyTo 2024-09-28 19:03:01 -04:00
Isaac Marovitz
cb8fdeafbc Cleanup present 2024-09-28 19:03:01 -04:00
Isaac Marovitz
1f29a76ea3 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-09-28 19:03:01 -04:00
SamoZ256
1f91c74a95 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-09-28 19:03:01 -04:00
SamoZ256
20b1f6a6ee Fix Scott Pilgrim (#15)
* check for null vertex functions

* format

* Format

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-09-28 19:03:01 -04:00
Isaac Marovitz
8b7ac4e87f Suppress GC Finalize on StateCache 2024-09-28 19:03:01 -04:00
Isaac Marovitz
bbcd05aacf Use Stack instead of List 2024-09-28 19:03:01 -04:00
Isaac Marovitz
0e095c778a Whitespace formatting 2024-09-28 19:03:01 -04:00
Samuliak
2833642858 dispose all temporary buffers 2024-09-28 19:03:01 -04:00
Samuliak
f470430c2f dispose temporary metal buffer 2024-09-28 19:03:01 -04:00
Samuliak
051bd144e1 dispose drawable texture view 2024-09-28 19:03:01 -04:00
Samuliak
68f6c08287 implement texture get data 2024-09-28 19:03:01 -04:00
Samuliak
704a78c11f fix: don't dispose stencil state before using 2024-09-28 19:03:01 -04:00
Samuliak
acce02bdf5 allow null depth stencil render targets 2024-09-28 19:03:01 -04:00
Samuliak
8d7be4fe25 reset certain state before doing blit or clear 2024-09-28 19:03:01 -04:00
Samuliak
57a173a671 reset viewport before blit 2024-09-28 19:03:01 -04:00
Samuliak
e6e898b297 dispose encoder state manager 2024-09-28 19:03:01 -04:00
Samuliak
7654f0b16c dispose all objects in encoder state manager 2024-09-28 19:03:01 -04:00
Samuliak
c26df1f7a3 dispose caches 2024-09-28 19:03:01 -04:00
Samuliak
41fb433495 warn about barriers 2024-09-28 19:03:01 -04:00
Samuliak
1a0b928c35 do memory barriers 2024-09-28 19:03:01 -04:00
Samuliak
17334b2131 remove useless parameters 2024-09-28 19:03:01 -04:00
Samuliak
be9f5dcf69 set the inline state after restoring state 2024-09-28 19:03:01 -04:00
Samuliak
f08d6c1cad make states private 2024-09-28 19:03:01 -04:00
Samuliak
8eba42447f fix: incorrect merge stuff 2024-09-28 19:03:01 -04:00
Samuliak
3ec45f73f4 don't interrupt render pass before color clear 2024-09-28 19:03:01 -04:00
Samuliak
b475a44941 implement save and restore state system 2024-09-28 19:03:01 -04:00
Samuliak
295845e6e3 revert deferred clears 2024-09-28 19:03:01 -04:00
Samuliak
79acae3709 prepare for deferred clears 2024-09-28 19:03:01 -04:00
Samuliak
d423a53595 resolve merge conflicts 2024-09-28 19:03:01 -04:00
Isaac Marovitz
f4190bd95a Rebase 2024-09-28 19:03:01 -04:00
Isaac Marovitz
997393bc65 Cleanup + Format 2024-09-28 19:03:01 -04:00
Isaac Marovitz
937d84018e Start Proper Dispose 2024-09-28 19:03:01 -04:00
Samuliak
4bbf7b67d4 do texture barrier tiled 2024-09-28 19:03:01 -04:00
Samuliak
b1549be8c3 do texture barrier 2024-09-28 19:03:01 -04:00
Samuliak
0d15f0fc90 implement depth stencil cache 2024-09-28 19:03:01 -04:00
Isaac Marovitz
20beb2e250 Fix typo in SamplerType.TextureBuffer 2024-09-28 19:03:01 -04:00