SamoZ256
6cc4d46e8c
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-12-23 21:32:34 -06:00
Isaac Marovitz
bea46ff9ce
Cleanup + Format
2024-12-23 21:29:50 -06:00
Isaac Marovitz
ad4db6b242
Fix typo in SamplerType.TextureBuffer
2024-12-23 21:29:37 -06:00
Isaac Marovitz
381f4ec091
FragmentOutputDepth Fixes
2024-12-23 21:29:20 -06:00
Isaac Marovitz
b76f9105c8
Depth Sampler Fixes
2024-12-23 21:29:09 -06:00
Isaac Marovitz
486fd78eba
Revert position changes
2024-12-23 21:29:06 -06:00
Isaac Marovitz
38385bad30
Nvm it should be in.position
2024-12-23 21:29:04 -06:00
Isaac Marovitz
27ece39dbe
More shader fixes
2024-12-23 21:29:02 -06:00
Samuliak
765ca8e6c0
don't use mask on size query
2024-12-23 21:28:57 -06:00
Samuliak
d5b98d6187
declare local memory
2024-12-23 21:28:51 -06:00
Samuliak
913f25b2a0
support multiple render targets & fix: incorrect texture name
2024-12-23 21:28:41 -06:00
Samuliak
91d1bb6c08
format
2024-12-23 21:24:50 -06:00
Samuliak
22d3fa068d
use 0 instead of undef
2024-12-23 21:24:45 -06:00
Samuliak
d08218a809
fix: pass array index as an additional argument to sample
2024-12-23 21:24:42 -06:00
Samuliak
b7414c1e4d
don't declare samplers for separate textures
2024-12-23 21:24:40 -06:00
Samuliak
a66ab905a9
don't hardcode texture type
2024-12-23 21:24:37 -06:00
Samuliak
2bef29b200
offset storage buffer bindings by 15
2024-12-23 21:24:35 -06:00
Samuliak
72eb47513c
fix: incorrect abs instruction
2024-12-23 21:24:32 -06:00
Samuliak
6095f14646
add: vertex and instance id arguments
2024-12-23 21:24:29 -06:00
Samuliak
c3a9a0d625
determine type of buffer by its field types
2024-12-23 21:24:03 -06:00
Samuliak
b2a0ca0e2b
add: textures and samplers as shader arguments & fix: issue with casting
2024-12-23 21:23:28 -06:00
Samuliak
e3364b0fcc
support fragment coord as an input to a shader
2024-12-23 21:23:24 -06:00
Isaac Marovitz
ebd2d82ff3
Buffer bindings in shader…
...
Will need to be reworked
2024-12-23 21:21:36 -06:00
Isaac Marovitz
64e9dcee3d
Fix buffer access syntax
2024-12-23 21:19:39 -06:00
Isaac Marovitz
3117aeca7f
Cleanup Shader I/O
2024-12-23 21:17:17 -06:00
Isaac Marovitz
987a42ce30
Fix fragment shader bindings
2024-12-23 21:17:09 -06:00
Isaac Marovitz
e2445990a5
Fix some shader gen problems…
2024-12-23 21:16:52 -06:00
Isaac Marovitz
dc4305f1cf
Formatting
2024-12-23 21:16:48 -06:00
Isaac Marovitz
b7a0aefa80
Make TypeConversion failure an error
2024-12-23 21:16:42 -06:00
Isaac Marovitz
7a99143a8a
Fix MSL Reinterpret Casts
2024-12-23 21:16:39 -06:00
Isaac Marovitz
c0da3d68ca
Formatting
2024-12-23 21:16:07 -06:00
Isaac Marovitz
5d90932277
Dont specify [[stage_in]] on fragment
2024-12-23 21:14:06 -06:00
Isaac Marovitz
d45c7711ba
Fix fragment shaders (and fuck everything up)
2024-12-23 21:09:35 -06:00
Isaac Marovitz
fe62c794b9
Fix fragment output color
2024-12-23 21:08:21 -06:00
Isaac Marovitz
d65858be25
Fix IoMap variable names
...
Output struct
Lazy Vertex IO
Output fixes
Fix output struct definition
MSL Binding Model description
Might need tweaks/adjustments
Cleanup
Typo + Format
2024-12-23 21:07:58 -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
Isaac Marovitz
b1785c0b14
Update for new Shader IR format
2024-12-23 21:01:10 -06:00
Isaac Marovitz
dc4d3078ef
Vertex Input Attributes
2024-12-23 21:00:45 -06:00
Isaac Marovitz
4b5c3d7fc6
More Shader Gen Stuff
...
Mostly copied from GLSL since in terms of syntax within blocks they’re pretty similar. Likely the result will need tweaking…
Isn’t that conveniant?
“Do the simd_shuffle”
atomics
Remaining instructions
Remove removed special instructions
Getting somewhere…
2024-12-23 21:00:23 -06:00
Isaac Marovitz
7441d94f10
Formatting
2024-12-23 20:57:31 -06:00
Isaac Marovitz
a8b4e643d0
Start of MSL instructions
...
Remaining functions
2024-12-23 20:55:40 -06:00
Isaac Marovitz
a7908c187d
Warn when generating unsupported shader
2024-12-23 20:55:27 -06:00
Evan Husted
cbad43b003
some initial metal commits cherry-picked
2024-12-23 20:35:49 -06:00
Marco Carvalho
ff6628149d
Migrate to .NET 9 ( #198 )
2024-12-19 18:52:25 -06:00
TheToid
baf179efdb
ignore macos attribute files ( #302 )
2024-11-28 16:55:51 -06:00
Evan Husted
139c195eb7
misc: Replace "" with string.Empty.
2024-11-01 11:57:23 -05:00
riperiperi
04d68ca616
GPU: Ensure all clip distances are initialized when used ( #7363 )
...
* GPU: Ensure all clip distances are initialized when used
* Shader cache version
2024-09-26 14:19:12 -03:00
gdkchan
d717aef2be
Shader: Assume the only remaining source is the right one when all others are undefined ( #7331 )
...
* Shader: Assume the only remaining source is the right one when all other are undefined
* Shader cache version bump
* Improve comment
2024-09-19 21:23:09 -03:00