Commit Graph

60 Commits

Author SHA1 Message Date
Isaac Marovitz
2d522b1675 D32FS8 to D24S8 Conversion 2024-12-23 21:43:10 -06:00
Isaac Marovitz
967887d050 Upstream changes 2024-12-23 21:43:04 -06:00
riperiperi
e8de1156eb Patch some leaks and only perform copies on valid textures (#37) 2024-12-23 21:42:42 -06:00
Isaac Marovitz
40ea153616 DepthStencil Blits 2024-12-23 21:40:40 -06:00
Isaac Marovitz
4373610790 Multisample Blits
Partially fixes Sonic Colors Ultimate
2024-12-23 21:40:38 -06:00
Isaac Marovitz
b468569665 Formatting cleanup 2024-12-23 21:39:36 -06:00
Isaac Marovitz
353a6ca4bb Formatting 2024-12-23 21:39:31 -06:00
riperiperi
8cbd44aecb implement compressed/uncompressed copy, fix other copies, fix int/uint output shaders (#33) 2024-12-23 21:39:09 -06:00
riperiperi
26da57cccd Maintain identity swizzle view of textures for rendering 2024-12-23 21:39:03 -06:00
riperiperi
82b5f8e681 Fix a bunch of issues with texture copy and flush (#32)
* Fix a bunch of issues with texture copy and flush

* TextureCopy helper class, fix clear bug
2024-12-23 21:38:59 -06:00
Isaac Marovitz
58527e02ee Cleanup + Format 2024-12-23 21:38:54 -06:00
riperiperi
879c93cf73 Preload command speedup, Texture/buffer data flush, blit shader fix (#30)
* Move encoder state to be tied to command buffer, so preload and background cbs have their own encoder state

* Texture buffer/data flush, blit shader fix
2024-12-23 21:38:13 -06:00
Isaac Marovitz
2860db198c Stop depth/stencil blits from crashing everything 2024-12-23 21:38:04 -06:00
riperiperi
4b53d18bef Fix Geometry/TFB on compute, Buffer Textures, add Window Resizing (#28) 2024-12-23 21:38:00 -06:00
riperiperi
bbbc9e529d State and cache optimization (#27)
* WIP pipeline/depth state cache rework

* Fix some issues

* Fix some more default values

* Reduce allocations for state changes

* fix helpershader stuff

* explanation comment

* fix depth bias
2024-12-23 21:37:58 -06:00
Isaac Marovitz
dae0f3cded Argument Buffers (#24)
* Stuff

* More arg buffer stuff

* Fixes

* Rebase

* Pass storage buffers to inline functions

* Fix binding

* Fix typo + Fix a couple shaders

* Enforce ids

* Dispose

* Mark used buffers as resident

* Update depth clear shader

* Fix non-contiguous struct defs

* Update ChangeBufferStride

* Fix StorageBuffer assignments

* Fix odyssey crash

* Retain buffer bindings

* Pad Std140

* Set texture data with safe buffers

* Clone buffers

* Always declare vert in

* Stop clears from breaking OpenGL games

* Fix depth clear

* Use invariant position

* Horribly inefficient texture & sampler arg buffers

* Fix missing struct access

* Minimise rebinds as much as possible

* Build arg buffers on staging buffer
2024-12-23 21:37:01 -06:00
Isaac Marovitz
58eefa8bdf Big GetData()
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2024-12-23 21:36:52 -06:00
Isaac Marovitz
0ebc8bd1b8 Fix Animal Crossing Crash 2024-12-23 21:36:50 -06:00
Isaac Marovitz
197184657f Cleanup Pipeline
Housekeeping

More housekeeping
2024-12-23 21:36:44 -06:00
riperiperi
20cf1a08c1 don't recreate render pipeline unless we're about to draw, pass view depth properly (#22) 2024-12-23 21:35:36 -06:00
Isaac Marovitz
dda746c0fb Metal: Buffers Take 2 (#21)
* Basic BufferManager

* Start Scoped Command Buffers

* Fences stuff

* Remember to cleanup sync manager

* Auto, Command Buffer Dependants

* Cleanup

* Cleanup + Fix Texture->Buffer Copies

* Slow buffer upload

* Cleanup + Rework TextureBuffer

* Don’t get unsafe

* Cleanup

* Goddamn it

* Staging Buffer + Interrupt Action + Flush
2024-12-23 21:35:33 -06:00
Isaac Marovitz
24ab7788d8 Fix 3D -> 3D Texture Copies 2024-12-23 21:34:57 -06:00
Isaac Marovitz
746c897206 Handle Array Format SetData 2024-12-23 21:34:48 -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
43ad627d4f Implement Texture CopyTo 2024-12-23 21:32:45 -06:00
Samuliak
60ece6d9a1 dispose all temporary buffers 2024-12-23 21:31:52 -06:00
Samuliak
58b42a1143 dispose temporary metal buffer 2024-12-23 21:31:47 -06:00
Samuliak
6ab989ac54 implement texture get data 2024-12-23 21:31:36 -06:00
Isaac Marovitz
58fb8564a8 Start Proper Dispose 2024-12-23 21:29:47 -06:00
Samuliak
7a6c7196c8 fix: incorrect layer count of texture view 2024-12-23 21:28:59 -06:00
Isaac Marovitz
401ad1f983 Make Texture Volatile on dispose 2024-12-23 21:26:57 -06:00
Isaac Marovitz
c7b6e4cf80 Break everything :D 2024-12-23 21:25:24 -06:00
Isaac Marovitz
18e1569941 Rebase + Format 2024-12-23 21:23:59 -06:00
Samuliak
362dc6eaea use unknown texture usage 2024-12-23 21:23:47 -06:00
Samuliak
de23abcf90 create GetSwizzle helper function 2024-12-23 21:23:32 -06:00
Samuliak
8a0dd491b9 support texture views 2024-12-23 21:23:20 -06:00
Isaac Marovitz
b85721b738 Rebase + GAL Changes 2024-12-23 21:23:06 -06:00
Isaac Marovitz
65b7af6308 Format 2024-12-23 21:19:22 -06:00
Isaac Marovitz
36fe41bffd Format 2024-12-23 21:19:19 -06:00
Isaac Marovitz
efa9d56a56 Fix Cubemap & Array Texture Creation 2024-12-23 21:19:08 -06:00
Isaac Marovitz
b95e1d288b Properly check for 3D 2024-12-23 21:17:32 -06:00
Isaac Marovitz
48aba086e1 Fix swizzle for certain formats 2024-12-23 21:17:28 -06:00
Isaac Marovitz
dc4305f1cf Formatting 2024-12-23 21:16:48 -06:00
Isaac Marovitz
b157a8e549 Revise ISampler 2024-12-23 21:16:20 -06:00
Isaac Marovitz
c0da3d68ca Formatting 2024-12-23 21:16:07 -06:00
Isaac Marovitz
a3da70edc2 Boot TOTK 2024-12-23 21:05:28 -06:00
Isaac Marovitz
94e699eeba Boot Sonic Mania 2024-12-23 21:01:19 -06:00
Isaac Marovitz
c1ef270b9d Cleanup encoder getting + Fix capture overflow 2024-12-23 20:58:32 -06:00
Isaac Marovitz
7441d94f10 Formatting 2024-12-23 20:57:31 -06:00