Both XInput and DInput are migrated together. It's best to keep them in XInput folder.
As for Xapi files, may not require any plugin? Or possible put into their own folder?
Cortex (and likely many others)
Calling the unpatched trampoline of the patched function is enough to
solve the issue: This further enforces that unpatching these functions
and reading from NV2A state is the right thing to do, work will continue
on that as a seperate branch.
This allows for both steps to be completely disconnected, easily
allowing patches to be turned on or off based on a set of flags, as well
as preventing the need to clear the HLE cache when switching from
HLE->LLE.
This also allows patches to be seen/modifed from a central location,
no more searching through the codebase to determine if a function should
be patched or not, and no more 'FUNC_EXPORTS/GetProcAddress' magic!
Currently, this is used for HLE only, but could really shine when
extended to introduce optional detour based logging even when LLE is
enabled.
For example We could easily add a LLE_D3D_DETOUR flag, which when
enabled, patches functions with a wrapper, which simply logs input and
output, calling the original xbox function via a trampoline.
This would be great for debugging, as we'd get a full call trace from
the API level, even when not implementing HLE.
There's also the possibility of mixing in some patches even with LLE
enabled: for a hybrid HLE/LLE solution of the same functionality,
but there are no plans to implement that at this moment of time.
- Updated incomplete logic for texm instructions to perform correct number of dot products
- updated CMP instruction logic to more closely match CND logic
- Added missing compare to depth instruction
- Moved recompiled results into shader structure as mappings are needed when resolving constant register indexes
- Moved texture mode decoding to before fixups and optimizations
- Added initial method to fix uninitialized registers components
- Added fixes for accesses to registers that became read-only in 1.4+
- Updated logic that initialized texture coordinate register accesses
- Additional logic to fix LRP instruction that accessed registers more than allowed
- Preparations for method to handle general register access limitations
- Moved patching of scalar instructions to catch those missed before
- Added enumeration values for additional DCL instructions
- Added enumeration values for additional TEXLD and TEXCRD instructions
- Added enumeration values for Sampler and Output Color registers
- Added additional constant declarations for use as scaling parameters when replacing unsupported instruction and argument modifiers
- Added helper method for checking set argument modifier flags
- Added helper method for setting parameter to declared constant register value
- Increased number of Intermediate slots
- Added helper method to set parameter to unclamped color value
- Added helper methods that allow for searching for free registers to be used as outputs
- Added helper method to retrieve maximum register counts based on type
- Updated register replacement methods to allow specifying range and exclusion
- Added helper method to determine which registers are valid for output on PC
- Added additional optimizations for MAD instructions
- Added conversion of CND instruction on unsupported pixel shader versions
- Added additional methods to fix destination register usage, constant value parameters, and argument and instruction modifiers
- Added additional method to add output to color register when required
- Updated texture mode decoding to support requirements for pixel shader version 2.0 (declare samplers, declare input registers, texcoord and texcrd usage, etc.)
- Fix for loops that were overrunning parameter counts
- Added additional constant value logic to attempt to use constant registers when possible