Commit Graph

3654 Commits

Author SHA1 Message Date
Isaac Marovitz 802d4f043c Log failed format conversions 2024-09-15 08:42:19 -04:00
Isaac Marovitz 607eadda79 Print shader code involved in failed linking 2024-09-15 08:42:19 -04:00
Isaac Marovitz 7ef43a6d3f Don’t use DidModifyRange 2024-09-15 08:42:19 -04:00
Isaac Marovitz 330440b569 Fix sample compare 2024-09-15 08:42:19 -04:00
Isaac Marovitz 395a6cc218 Depth Bias 2024-09-15 08:42:19 -04:00
Isaac Marovitz 7d35adc73a Map R5G5B5A1Unorm 2024-09-15 08:42:19 -04:00
Samuliak b6786558fb override Equals for render pipeline hash 2024-09-15 08:42:19 -04:00
Isaac Marovitz 5182a03697 Disable scaled vertex formats 2024-09-15 08:42:19 -04:00
Isaac Marovitz dac9d3146c Disable Vector Indexing Bug Workaround 2024-09-15 08:42:19 -04:00
Isaac Marovitz 6509fc8a24 Fix modulo operator
Support sample offsets

Include FragmentIn as additional arg

Always declare frag output struct

SubgroupLaneId
2024-09-15 08:42:19 -04:00
Isaac Marovitz 4fd048bfd7 Workaround for Wonder 2024-09-15 08:42:19 -04:00
Isaac Marovitz 6184eefaa3 Fix 3D -> 3D Texture Copies 2024-09-15 08:42:19 -04:00
Isaac Marovitz cc25ebd744 Fix Clear Viewport 2024-09-15 08:42:19 -04:00
Isaac Marovitz 7e693d5baa Fix sample-less reads with lod 2024-09-15 08:42:19 -04:00
Isaac Marovitz ac1a133c80 Fix Pack and UnpackHalf2x16 2024-09-15 08:42:19 -04:00
Isaac Marovitz 5c44c3c359 Handle Array Format SetData 2024-09-15 08:42:19 -04:00
Isaac Marovitz 2c2aa0472a Cleanup 2024-09-15 08:42:19 -04:00
Isaac Marovitz d6309a6242 Implement IoVariable.FrontFacing 2024-09-15 08:42:19 -04:00
Isaac Marovitz 4480197b70 Fix LOD sample typo 2024-09-15 08:42:19 -04:00
Isaac Marovitz 105638de6d Rebase Changes 2024-09-15 08:42:19 -04:00
Isaac Marovitz 01536c833d More cleanup 2024-09-15 08:42:19 -04:00
Isaac Marovitz eabc2fb781 Cleanup + Format 2024-09-15 08:42:19 -04:00
Isaac Marovitz f92233fcb3 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-15 08:42:19 -04:00
Isaac Marovitz 4fa4c78aa4 Handle stride 0 on regular buffers 2024-09-15 08:42:19 -04:00
Isaac Marovitz 07230581ce Buffer Descriptor Step Functions 2024-09-15 08:42:19 -04:00
Isaac Marovitz d15716d4e2 Sample LOD Level 2024-09-15 08:42:19 -04:00
Isaac Marovitz c3378cd933 Fix FragmentOutputColor Type 2024-09-15 08:42:19 -04:00
Isaac Marovitz 00cf9f5281 Stencil Ref Value 2024-09-15 08:42:19 -04:00
Isaac Marovitz 7d78545385 Stencil Fixes 2024-09-15 08:42:19 -04:00
Isaac Marovitz ec7168cffe RenderTargetColorMasks 2024-09-15 08:42:19 -04:00
Isaac Marovitz 1edefacd30 Make dotnet format happy 2024-09-15 08:42:19 -04:00
SamoZ256 224c714150 Zero vertex buffer (#17)
* cast src size to float

* implement zero buffers
2024-09-15 08:42:19 -04:00
Isaac Marovitz 1e3b0787d8 Implement Texture CopyTo 2024-09-15 08:42:19 -04:00
Isaac Marovitz 3ccd086b26 Cleanup present 2024-09-15 08:42:19 -04:00
Isaac Marovitz 7f12a233f1 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-15 08:42:19 -04:00
SamoZ256 63bd08f12d 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-15 08:42:19 -04:00
SamoZ256 1d19cc7d51 Fix Scott Pilgrim (#15)
* check for null vertex functions

* format

* Format

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
2024-09-15 08:42:19 -04:00
Isaac Marovitz 5a055a0650 Suppress GC Finalize on StateCache 2024-09-15 08:42:19 -04:00
Isaac Marovitz 25076a2669 Use Stack instead of List 2024-09-15 08:42:19 -04:00
Isaac Marovitz afcb74fcf8 Whitespace formatting 2024-09-15 08:42:19 -04:00
Samuliak 26876b8ec6 dispose all temporary buffers 2024-09-15 08:42:19 -04:00
Samuliak 91fdd90fb8 dispose temporary metal buffer 2024-09-15 08:42:19 -04:00
Samuliak 7d79075846 dispose drawable texture view 2024-09-15 08:42:19 -04:00
Samuliak 5ca5a3f2d8 implement texture get data 2024-09-15 08:42:19 -04:00
Samuliak cce450c8c5 fix: don't dispose stencil state before using 2024-09-15 08:42:19 -04:00
Samuliak 1965ac74a8 allow null depth stencil render targets 2024-09-15 08:42:19 -04:00
Samuliak f8a81aac84 reset certain state before doing blit or clear 2024-09-15 08:42:19 -04:00
Samuliak 8a5748aa28 reset viewport before blit 2024-09-15 08:42:19 -04:00
Samuliak c2ab9f4b43 dispose encoder state manager 2024-09-15 08:42:19 -04:00
Samuliak ad1fe10533 dispose all objects in encoder state manager 2024-09-15 08:42:19 -04:00