Commit Graph

3646 Commits

Author SHA1 Message Date
Isaac Marovitz d694878d2c
Cleanup 2024-09-18 23:27:37 +02:00
Isaac Marovitz 5b47001b38
Implement IoVariable.FrontFacing 2024-09-18 23:27:36 +02:00
Isaac Marovitz 159db87d86
Fix LOD sample typo 2024-09-18 23:27:36 +02:00
Isaac Marovitz 8a6fde9fea
Rebase Changes 2024-09-18 23:27:36 +02:00
Isaac Marovitz 2996f96a42
More cleanup 2024-09-18 23:27:36 +02:00
Isaac Marovitz 638b9e5f69
Cleanup + Format 2024-09-18 23:27:35 +02:00
Isaac Marovitz 3ff27f541e
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-18 23:27:35 +02:00
Isaac Marovitz cc747047cd
Handle stride 0 on regular buffers 2024-09-18 23:26:44 +02:00
Isaac Marovitz de2a8cece4
Buffer Descriptor Step Functions 2024-09-18 23:26:43 +02:00
Isaac Marovitz 4e130e7e38
Sample LOD Level 2024-09-18 23:26:43 +02:00
Isaac Marovitz 63ab5b0639
Fix FragmentOutputColor Type 2024-09-18 23:26:43 +02:00
Isaac Marovitz 2941f02c87
Stencil Ref Value 2024-09-18 23:26:42 +02:00
Isaac Marovitz 01122ca032
Stencil Fixes 2024-09-18 23:26:42 +02:00
Isaac Marovitz d8f9aaeaac
RenderTargetColorMasks 2024-09-18 23:26:42 +02:00
Isaac Marovitz 9238b6723c
Make dotnet format happy 2024-09-18 23:26:41 +02:00
SamoZ256 2225aa17e3
Zero vertex buffer (#17)
* cast src size to float

* implement zero buffers
2024-09-18 23:26:41 +02:00
Isaac Marovitz 4f649f5650
Implement Texture CopyTo 2024-09-18 23:26:40 +02:00
Isaac Marovitz eac8ac23ad
Cleanup present 2024-09-18 23:26:40 +02:00
Isaac Marovitz b7915ac3cf
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-18 23:26:40 +02:00
SamoZ256 8cbdbad67f
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-18 23:26:39 +02:00
SamoZ256 5f6d375b00
Fix Scott Pilgrim (#15)
* check for null vertex functions

* format

* Format

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-09-18 23:26:39 +02:00
Isaac Marovitz f837be962f
Suppress GC Finalize on StateCache 2024-09-18 23:26:39 +02:00
Isaac Marovitz a14ca383b2
Use Stack instead of List 2024-09-18 23:26:38 +02:00
Isaac Marovitz c19dee2f8e
Whitespace formatting 2024-09-18 23:26:38 +02:00
Samuliak f7fc475ee4
dispose all temporary buffers 2024-09-18 23:26:38 +02:00
Samuliak de01995e95
dispose temporary metal buffer 2024-09-18 23:26:37 +02:00
Samuliak 330935e780
dispose drawable texture view 2024-09-18 23:26:37 +02:00
Samuliak c8d51c693e
implement texture get data 2024-09-18 23:26:37 +02:00
Samuliak 09983b8188
fix: don't dispose stencil state before using 2024-09-18 23:26:36 +02:00
Samuliak 24158b2e1c
allow null depth stencil render targets 2024-09-18 23:26:36 +02:00
Samuliak 6d12cb529d
reset certain state before doing blit or clear 2024-09-18 23:26:36 +02:00
Samuliak 934a5941b9
reset viewport before blit 2024-09-18 23:26:35 +02:00
Samuliak 680f950a59
dispose encoder state manager 2024-09-18 23:26:35 +02:00
Samuliak af4b762ce3
dispose all objects in encoder state manager 2024-09-18 23:26:35 +02:00
Samuliak 952ed6bb41
dispose caches 2024-09-18 23:26:35 +02:00
Samuliak 4a97c2b64d
warn about barriers 2024-09-18 23:26:34 +02:00
Samuliak cb183b3945
do memory barriers 2024-09-18 23:26:34 +02:00
Samuliak b051cda16a
remove useless parameters 2024-09-18 23:26:33 +02:00
Samuliak c3c75b2939
set the inline state after restoring state 2024-09-18 23:26:33 +02:00
Samuliak 541f1096b7
make states private 2024-09-18 23:26:33 +02:00
Samuliak 6296de1a65
fix: incorrect merge stuff 2024-09-18 23:26:32 +02:00
Samuliak bff52c221b
don't interrupt render pass before color clear 2024-09-18 23:26:32 +02:00
Samuliak 37272c6223
implement save and restore state system 2024-09-18 23:26:32 +02:00
Samuliak 56fcfba689
revert deferred clears 2024-09-18 23:26:31 +02:00
Samuliak 19c5391e7d
prepare for deferred clears 2024-09-18 23:26:31 +02:00
Samuliak f93d309bff
resolve merge conflicts 2024-09-18 23:26:30 +02:00
Isaac Marovitz 854c25e0a6
Rebase 2024-09-18 23:26:30 +02:00
Isaac Marovitz a42b70890b
Cleanup + Format 2024-09-18 23:26:30 +02:00
Isaac Marovitz 67e83af943
Start Proper Dispose 2024-09-18 23:26:29 +02:00
Samuliak 8ad4ee2892
do texture barrier tiled 2024-09-18 23:26:29 +02:00