Commit Graph

17 Commits

Author SHA1 Message Date
Billy Laws
7e1c58accc Implement indirect draws in the Maxwell 3D interconnect
These will be used by the HLE indirect draw macro to perform indirect draws without waiting for GPU idle.
2023-03-19 13:52:15 +00:00
Billy Laws
d5b6c68ae4 Split out common parts of Maxwell 3D draws
These will be able to be shared between indirect and normal draws.
2023-03-19 13:52:15 +00:00
Billy Laws
be8cbabd97 Commonise maxwell3d texture code
This will be shared with the compute engine implementation.
2022-12-03 22:50:56 +00:00
Billy Laws
61e95c4b2c Commonise maxwell3d sampler code
This will be shared with the compute engine implementation, the only thing of note with this is that the binding register is now passed as a param since it is part of the compute QMD which can't be dirty tracked.
2022-12-03 22:50:56 +00:00
Billy Laws
1088ed514c Introduce texture usage system to ensure RPs are split when necessary
Vulkan doesn't allow sampling a texture and using it as an RT in the same RP, by tracking the texture usage status and splitting RPs when this occurs we can avoid such potential sync errors.
2022-11-02 17:46:07 +00:00
Billy Laws
c5ec484d9a Avoid redundantly passing executor in ctors when it's already in ChannelCtx 2022-11-02 17:46:07 +00:00
Billy Laws
b72720e8db Finish off transform feedback implementation 2022-11-02 17:46:07 +00:00
Billy Laws
9ce848d4e0 Implement descriptor update batching and push descriptors
Batching helps to avoid the need to attach so many objects to the fence cycle, which ends up taking a fair bit of time due to the allocation required.
2022-11-02 17:46:07 +00:00
Billy Laws
ef0ae30667 Implement Maxwell3D texture pool management and view creation
Ontop of the TIC cache from previous code a simple index based lookup has been added which vastly speeds things up by avoding the need to hash the TIC structure every time.
2022-11-02 17:46:07 +00:00
Billy Laws
01a5e95ce1 Implement non-indexed quad conversion support in new GPU
Uses memory::Buffer directly to allow for cleaner recreation and allow for removing host-only buffers from Buffer in the future.
2022-11-02 17:46:07 +00:00
Billy Laws
68b6b20f78 Bunch of cleanup/bugfixes for initial pipeline desc set impl
Cleans up code slightly, fixes keeping track of per-stage descriptor counts and fixes storage buffer caching + more random stuff.
2022-11-02 17:46:07 +00:00
Billy Laws
e1717ed811 Implement Maxwell samplers 2022-11-02 17:46:07 +00:00
Billy Laws
04cea9239f Implement descriptor set updating through StateUpdater
Will automatically resolve buffer views at record-time into descriptor write/copy structures then apply the write and bind the set.
2022-11-02 17:46:07 +00:00
Billy Laws
7b4da52445 Add a fast binding sync path for when only one cbuf has changed
SMO implements instanced draws by repeating the same draw just with a different constant buffer bound. Reduce the cost of this significantly by detecting such cases and instead of processing every descriptor, copy the previous descriptor set and update only the ones affected by the bound constant buffer.

Credits to ripinperiperi for the initial idea and making me aware of how SMO does these draws
2022-11-02 17:46:07 +00:00
Billy Laws
cf0752f937 Use NCE memory tracking for guest shaders
Prevents needing to hash them for every single pipeline state update, without this just hashing shaders takes up a significant amount of time.
2022-11-02 17:46:07 +00:00
Billy Laws
e77e4891dc Tidy up Maxwell 3D regs a bit 2022-11-02 17:46:07 +00:00
Billy Laws
ef11900a39 Introduce reworked Maxwell 3D core interconnect
This mainly distributes operations down to activeState and pipelineState, aside from clears which are implemented in-place. The exposed interface is much reduced as opposed to the previous GraphicsContext system due to the newly introduced dirty system, this should hopefully make the code more maintainable and keep actual rendering operations seperate from primitive restart state or whatever. Currently draws are unimplemented and the only full implemented things are clears and constant buffer operations.
2022-11-02 17:46:07 +00:00