Commit graph

3667 commits

Author SHA1 Message Date
Isaac Marovitz
4cbcda8adc Workaround for Wonder 2024-06-20 17:11:38 +01:00
Isaac Marovitz
cbf1d577e1 Fix 3D -> 3D Texture Copies 2024-06-20 17:11:38 +01:00
Isaac Marovitz
bbf2bd9c56 Fix Clear Viewport 2024-06-20 17:11:38 +01:00
Isaac Marovitz
ffc11fb017 Fix sample-less reads with lod 2024-06-20 17:11:38 +01:00
Isaac Marovitz
94f61117c2 Fix Pack and UnpackHalf2x16 2024-06-20 17:11:38 +01:00
Isaac Marovitz
290ce0b025 Handle Array Format SetData 2024-06-20 17:11:38 +01:00
Isaac Marovitz
3323cc24dd Cleanup 2024-06-20 17:11:38 +01:00
Isaac Marovitz
0dbd8f0c2d Implement IoVariable.FrontFacing 2024-06-20 17:11:38 +01:00
Isaac Marovitz
2e4e82fe4b Fix LOD sample typo 2024-06-20 17:11:38 +01:00
Isaac Marovitz
0f2fe5aa07 Rebase Changes 2024-06-20 17:11:38 +01:00
Isaac Marovitz
f788dc0590 More cleanup 2024-06-20 17:11:38 +01:00
Isaac Marovitz
fd0c710940 Cleanup + Format 2024-06-20 17:11:38 +01:00
Isaac Marovitz
90bdbeedd0 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-06-20 17:11:38 +01:00
Isaac Marovitz
5379fd3e76 Handle stride 0 on regular buffers 2024-06-20 17:11:38 +01:00
Isaac Marovitz
55fef1c40b Buffer Descriptor Step Functions 2024-06-20 17:11:38 +01:00
Isaac Marovitz
35ec3a995c Sample LOD Level 2024-06-20 17:11:38 +01:00
Isaac Marovitz
35a7ecb550 Fix FragmentOutputColor Type 2024-06-20 17:11:38 +01:00
Isaac Marovitz
2b98e19b39 Stencil Ref Value 2024-06-20 17:11:38 +01:00
Isaac Marovitz
67f903e01d Stencil Fixes 2024-06-20 17:11:38 +01:00
Isaac Marovitz
d5d8a3d010 RenderTargetColorMasks 2024-06-20 17:11:38 +01:00
Isaac Marovitz
842eaf744d Make dotnet format happy 2024-06-20 17:11:38 +01:00
SamoZ256
3f3d881278 Zero vertex buffer (#17)
* cast src size to float

* implement zero buffers
2024-06-20 17:11:38 +01:00
Isaac Marovitz
e4d8744092 Implement Texture CopyTo 2024-06-20 17:11:38 +01:00
Isaac Marovitz
58847dac9c Cleanup present 2024-06-20 17:11:38 +01:00
Isaac Marovitz
81dd4d8a3f 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-06-20 17:11:38 +01:00
SamoZ256
a64ec22aa4 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-06-20 17:11:38 +01:00
SamoZ256
7b0ed79b8d Fix Scott Pilgrim (#15)
* check for null vertex functions

* format

* Format

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-06-20 17:11:38 +01:00
Isaac Marovitz
b8fddfca70 Suppress GC Finalize on StateCache 2024-06-20 17:11:38 +01:00
Isaac Marovitz
d11297ddf3 Use Stack instead of List 2024-06-20 17:11:38 +01:00
Isaac Marovitz
b3d4dcdbaf Whitespace formatting 2024-06-20 17:11:38 +01:00
Samuliak
6f2a331183 dispose all temporary buffers 2024-06-20 17:11:38 +01:00
Samuliak
58e09e72f1 dispose temporary metal buffer 2024-06-20 17:11:38 +01:00
Samuliak
fa8713835c dispose drawable texture view 2024-06-20 17:11:38 +01:00
Samuliak
7784385c37 implement texture get data 2024-06-20 17:11:38 +01:00
Samuliak
98964c5174 fix: don't dispose stencil state before using 2024-06-20 17:11:38 +01:00
Samuliak
5647f297b3 allow null depth stencil render targets 2024-06-20 17:11:38 +01:00
Samuliak
268ad89347 reset certain state before doing blit or clear 2024-06-20 17:11:38 +01:00
Samuliak
5a43c63335 reset viewport before blit 2024-06-20 17:11:38 +01:00
Samuliak
a2e7f14e21 dispose encoder state manager 2024-06-20 17:11:38 +01:00
Samuliak
5485292372 dispose all objects in encoder state manager 2024-06-20 17:11:38 +01:00
Samuliak
7abf75a97b dispose caches 2024-06-20 17:11:38 +01:00
Samuliak
8fcd94fb6e warn about barriers 2024-06-20 17:11:38 +01:00
Samuliak
1973f0082b do memory barriers 2024-06-20 17:11:38 +01:00
Samuliak
d251675fce remove useless parameters 2024-06-20 17:11:38 +01:00
Samuliak
e7c90b3f6d set the inline state after restoring state 2024-06-20 17:11:38 +01:00
Samuliak
119e460adb make states private 2024-06-20 17:11:38 +01:00
Samuliak
3481b6eb7e fix: incorrect merge stuff 2024-06-20 17:11:38 +01:00
Samuliak
9e18b61b87 don't interrupt render pass before color clear 2024-06-20 17:11:38 +01:00
Samuliak
f808196eab implement save and restore state system 2024-06-20 17:11:38 +01:00
Samuliak
6a526613da revert deferred clears 2024-06-20 17:11:38 +01:00