Commit Graph

16 Commits

Author SHA1 Message Date
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
a42c66e6d5 Sample LOD Level 2024-12-23 21:33:01 -06:00
Isaac Marovitz
bea46ff9ce Cleanup + Format 2024-12-23 21:29:50 -06:00
Isaac Marovitz
b76f9105c8 Depth Sampler Fixes 2024-12-23 21:29:09 -06:00
Samuliak
765ca8e6c0 don't use mask on size query 2024-12-23 21:28:57 -06:00
Samuliak
913f25b2a0 support multiple render targets & fix: incorrect texture name 2024-12-23 21:28:41 -06:00
Samuliak
d08218a809 fix: pass array index as an additional argument to sample 2024-12-23 21:24:42 -06:00
Samuliak
b2a0ca0e2b add: textures and samplers as shader arguments & fix: issue with casting 2024-12-23 21:23:28 -06:00
Isaac Marovitz
64e9dcee3d Fix buffer access syntax 2024-12-23 21:19:39 -06:00
Isaac Marovitz
4587905cd8 Partial TextureQuerySamples 2024-12-23 21:07:07 -06:00
Isaac Marovitz
9cc56a3bca Fix instructions 2024-12-23 21:06:58 -06:00
Isaac Marovitz
c5522e3694 Back to where we were
First special instruction

Start Load/Store implementation

Start TextureSample

Sample progress

I/O Load/Store Progress

Rest of load/store

TODO: Currently, the generator still assumes the GLSL style of I/O attributres. On MSL, the vertex function should output a struct which contains a float4 with the required position attribute.

TextureSize and VectorExtract

Fix UserDefined IO Vars

Fix stage input struct names
2024-12-23 21:05:34 -06:00