Compare commits

...

26 Commits

Author SHA1 Message Date
Evan Husted
c7db948fb3 misc: chore: Fix object creation everywhere else 2025-01-26 15:28:18 -06:00
Evan Husted
9e1a13b2ee misc: chore: Fix object creation in Audio project 2025-01-26 15:26:51 -06:00
Evan Husted
d95f724d17 misc: chore: Fix object creation in Metal 2025-01-26 15:26:11 -06:00
Evan Husted
e859bd5aa2 misc: chore: Fix object creation in Horizon generators 2025-01-26 15:26:01 -06:00
Evan Husted
ccef0b49eb misc: chore: Fix object creation in Shader project 2025-01-26 15:22:30 -06:00
Evan Husted
7f5a356c3d misc: chore: Fix object creation in Common project 2025-01-26 15:21:47 -06:00
Evan Husted
ae92fbf539 misc: chore: Fix object creation in Memory project 2025-01-26 15:20:28 -06:00
Evan Husted
56d373a011 misc: chore: Fix object creation in SPIRV generator 2025-01-26 15:19:53 -06:00
Evan Husted
742083ae3d misc: chore: Fix object creation in Horizon 2025-01-26 15:19:33 -06:00
Evan Husted
5fad450027 misc: chore: Fix object creation in Tests project 2025-01-26 15:19:01 -06:00
Evan Husted
929a16dd26 misc: chore: Fix object creation in Gpu project 2025-01-26 15:18:04 -06:00
Evan Husted
4e47c86f90 misc: chore: Fix object creation in GAL 2025-01-26 15:17:37 -06:00
Evan Husted
15d1528774 misc: chore: Fix object creation in ARMeilleure 2025-01-26 15:17:12 -06:00
Evan Husted
3cdaaa0b69 misc: chore: Fix object creation in Avalonia project 2025-01-26 15:16:50 -06:00
Evan Husted
5f023ca49b misc: chore: Fix object creation in Vulkan project 2025-01-26 15:16:32 -06:00
Evan Husted
eae6dba610 misc: chore: Fix object creation in OpenGL project 2025-01-26 15:16:12 -06:00
Evan Husted
94b65aec02 misc: chore: Fix object creation in Cpu project 2025-01-26 15:15:48 -06:00
Evan Husted
beab133c8d misc: chore: Fix object creation in HLE project 2025-01-26 15:15:26 -06:00
Evan Husted
f1fd5c9366 misc: chore: Link to Ryubing/Ryujinx in markdown docs 2025-01-26 14:28:55 -06:00
Evan Husted
5396327ac1 misc: chore: Replace GreemDev/Ryujinx with Ryubing/Ryujinx in Amiibo.json 2025-01-26 14:22:59 -06:00
Evan Husted
3f12727ef8 input: LED rainbow now updates the LED with the normal gamepad update loop instead of subscribing to an updated event for the rainbow color in SetConfiguration. 2025-01-25 23:13:51 -06:00
Evan Husted
8bfcebebf1 Merge remote-tracking branch 'origin/master' 2025-01-25 22:44:26 -06:00
Evan Husted
e3f20abd23 UI: RPC: Maintain game started timestamp for the duration of the AppHost 2025-01-25 22:44:16 -06:00
Daenorth
0c36bcd7d4 Added more titles to RPC (#569)
Added some more titles to the RPC environment

-Brawlhalla
-Minecraft
-Risk
-Stardew Vallet
-Valkyria Chronicles 4
-Super bomberman R
-Arcade archives Super mario bros
-Divinity Original sin 2 DE
-Monopoly
-titan Quest
2025-01-25 22:02:24 -06:00
shinyoyo
050b9a0da4 Updated Zh_CN Simplified Chinese (#578) 2025-01-25 21:59:20 -06:00
Dehunc
a1291f1061 Improved Simplified Chinese translation (#568)
Co-authored-by: Cwood <Cwood@DoVirt.org>
2025-01-25 21:59:06 -06:00
220 changed files with 1834 additions and 1820 deletions

View File

@@ -10,7 +10,7 @@ Make sure your SDK version is higher or equal to the required version specified
### Step 2
Either use `git clone https://github.com/GreemDev/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
Either use `git clone https://github.com/Ryubing/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
### Step 3

View File

@@ -14,13 +14,13 @@ We always welcome bug reports, feature proposals and overall feedback. Here are
### Finding Existing Issues
Before filing a new issue, please search our [open issues](https://github.com/GreemDev/Ryujinx/issues) to check if it already exists.
Before filing a new issue, please search our [open issues](https://github.com/Ryubing/Ryujinx/issues) to check if it already exists.
If you do find an existing issue, please include your own feedback in the discussion. Do consider upvoting (👍 reaction) the original post, as this helps us prioritize popular issues in our backlog.
### Writing a Good Feature Request
Please review any feature requests already opened to both check it has not already been suggested, and to familiarize yourself with the format. When ready to submit a proposal, please use the [Feature Request issue template](https://github.com/GreemDev/Ryujinx/issues/new?assignees=&labels=&projects=&template=feature_request.yml&title=%5BFeature+Request%5D).
Please review any feature requests already opened to both check it has not already been suggested, and to familiarize yourself with the format. When ready to submit a proposal, please use the [Feature Request issue template](https://github.com/Ryubing/Ryujinx/issues/new?assignees=&labels=&projects=&template=feature_request.yml&title=%5BFeature+Request%5D).
### Writing a Good Bug Report
@@ -34,13 +34,13 @@ Ideally, a bug report should contain the following information:
* A Ryujinx log file of the run instance where the issue occurred. Log files can be found in `[Executable Folder]/Logs` and are named chronologically.
* Additional information, e.g. is it a regression from previous versions? Are there any known workarounds?
When ready to submit a bug report, please use the [Bug Report issue template](https://github.com/GreemDev/Ryujinx/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D).
When ready to submit a bug report, please use the [Bug Report issue template](https://github.com/Ryubing/Ryujinx/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D).
## Contributing Changes
Project maintainers will merge changes that both improve the project and meet our standards for code quality.
The [Pull Request Guide](docs/workflow/pr-guide.md) and [License](https://github.com/GreemDev/Ryujinx/blob/master/LICENSE.txt) docs define additional guidance.
The [Pull Request Guide](docs/workflow/pr-guide.md) and [License](https://github.com/Ryubing/Ryujinx/blob/master/LICENSE.txt) docs define additional guidance.
### DOs and DON'Ts
@@ -74,14 +74,14 @@ We use and recommend the following workflow:
3. In your fork, create a branch off of main (`git checkout -b mybranch`).
- Branches are useful since they isolate your changes from incoming changes from upstream. They also enable you to create multiple PRs from the same fork.
4. Make and commit your changes to your branch.
- [Build Instructions](https://github.com/GreemDev/Ryujinx/blob/master/COMPILING.md) explains how to build and test.
- [Build Instructions](https://github.com/Ryubing/Ryujinx/blob/master/COMPILING.md) explains how to build and test.
- Commit messages should be clear statements of action and intent.
6. Build the repository with your changes.
- Make sure that the builds are clean.
- Make sure that `dotnet format` has been run and any corrections tested and committed.
7. Create a pull request (PR) against the Ryujinx/Ryujinx repository's **main** branch.
- State in the description what issue or improvement your change is addressing.
- Check if all the Continuous Integration checks are passing. Refer to [Actions](https://github.com/GreemDev/Ryujinx/actions) to check for outstanding errors.
- Check if all the Continuous Integration checks are passing. Refer to [Actions](https://github.com/Ryubing/Ryujinx/actions) to check for outstanding errors.
8. Wait for feedback or approval of your changes from the core development team
- Details about the pull request [review procedure](docs/workflow/pr-guide.md).
9. When the team members have signed off, and all checks are green, your PR will be merged.
@@ -90,7 +90,7 @@ We use and recommend the following workflow:
### Good First Issues
The team marks the most straightforward issues as [good first issues](https://github.com/GreemDev/Ryujinx/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). This set of issues is the place to start if you are interested in contributing but new to the codebase.
The team marks the most straightforward issues as [good first issues](https://github.com/Ryubing/Ryujinx/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). This set of issues is the place to start if you are interested in contributing but new to the codebase.
### Commit Messages
@@ -113,7 +113,7 @@ Also do your best to factor commits appropriately, not too large with unrelated
### PR - CI Process
The [Ryujinx continuous integration](https://github.com/GreemDev/Ryujinx/actions) (CI) system will automatically perform the required builds and run tests (including the ones you are expected to run) for PRs. Builds and test runs must be clean or have bugs properly filed against flaky/unexpected failures that are unrelated to your change.
The [Ryujinx continuous integration](https://github.com/Ryubing/Ryujinx/actions) (CI) system will automatically perform the required builds and run tests (including the ones you are expected to run) for PRs. Builds and test runs must be clean or have bugs properly filed against flaky/unexpected failures that are unrelated to your change.
If the CI build fails for any reason, the PR actions tab should be consulted for further information on the failure. There are a few usual suspects for such a failure:
* `dotnet format` has not been run on the PR and has outstanding stylistic issues.
@@ -134,5 +134,5 @@ Ryujinx uses some implementations and frameworks from other projects. The follow
- The license of the file is [permissive](https://en.wikipedia.org/wiki/Permissive_free_software_licence).
- The license of the file is left in-tact.
- The contribution is correctly attributed in the [3rd party notices](https://github.com/GreemDev/Ryujinx/blob/master/distribution/legal/THIRDPARTY.md) file in the repository, as needed.
- The contribution is correctly attributed in the [3rd party notices](https://github.com/Ryubing/Ryujinx/blob/master/distribution/legal/THIRDPARTY.md) file in the repository, as needed.

View File

@@ -7,11 +7,11 @@
# Ryujinx
[![Release workflow](https://github.com/GreemDev/Ryujinx/actions/workflows/release.yml/badge.svg)](https://github.com/GreemDev/Ryujinx/actions/workflows/release.yml)
[![Latest release](https://img.shields.io/github/v/release/GreemDev/Ryujinx)](https://github.com/GreemDev/Ryujinx/releases/latest)
[![Release workflow](https://github.com/Ryubing/Ryujinx/actions/workflows/release.yml/badge.svg)](https://github.com/Ryubing/Ryujinx/actions/workflows/release.yml)
[![Latest release](https://img.shields.io/github/v/release/GreemDev/Ryujinx)](https://github.com/Ryubing/Ryujinx/releases/latest)
<br>
[![Canary workflow](https://github.com/GreemDev/Ryujinx/actions/workflows/canary.yml/badge.svg)](https://github.com/GreemDev/Ryujinx/actions/workflows/canary.yml)
[![Latest canary release](https://img.shields.io/github/v/release/GreemDev/Ryujinx-Canary?label=canary)](https://github.com/GreemDev/Ryujinx-Canary/releases/latest)
[![Canary workflow](https://github.com/Ryubing/Ryujinx/actions/workflows/canary.yml/badge.svg)](https://github.com/Ryubing/Ryujinx/actions/workflows/canary.yml)
[![Latest canary release](https://img.shields.io/github/v/release/GreemDev/Ryujinx-Canary?label=canary)](https://github.com/Ryubing/Ryujinx-Canary/releases/latest)
</td>
</tr>
</table>
@@ -20,7 +20,7 @@
Ryujinx is an open-source Nintendo Switch emulator, originally created by gdkchan, written in C#.
This emulator aims at providing excellent accuracy and performance, a user-friendly interface and consistent builds.
It was written from scratch and development on the project began in September 2017.
Ryujinx is available on GitHub under the <a href="https://github.com/GreemDev/Ryujinx/blob/master/LICENSE.txt" target="_blank">MIT license</a>.
Ryujinx is available on GitHub under the <a href="https://github.com/Ryubing/Ryujinx/blob/master/LICENSE.txt" target="_blank">MIT license</a>.
<br />
</p>
<p align="center">
@@ -30,7 +30,7 @@
<br>
This is not a Ryujinx revival project. This is not a Phoenix project.
<br>
Guides and documentation can be found on the <a href="https://github.com/GreemDev/Ryujinx/wiki">Wiki tab</a>.
Guides and documentation can be found on the <a href="https://github.com/Ryubing/Ryujinx/wiki">Wiki tab</a>.
</p>
<p align="center">
If you would like a more preservative fork of Ryujinx, check out <a href="https://github.com/ryujinx-mirror/ryujinx">ryujinx-mirror</a>.
@@ -58,13 +58,13 @@ Stable builds are made every so often, based on the `master` branch, that then g
These stable builds exist so that the end user can get a more **enjoyable and stable experience**.
They are released every month or so, to ensure consistent updates, while not being an annoying amount of individual updates to download over the course of that month.
You can find the latest stable release [here](https://github.com/GreemDev/Ryujinx/releases/latest).
You can find the latest stable release [here](https://github.com/Ryubing/Ryujinx/releases/latest).
Canary builds are compiled automatically for each commit on the `master` branch.
While we strive to ensure optimal stability and performance prior to pushing an update, these builds **may be unstable or completely broken**.
These canary builds are only recommended for experienced users.
You can find the latest canary release [here](https://github.com/GreemDev/Ryujinx-Canary/releases/latest).
You can find the latest canary release [here](https://github.com/Ryubing/Ryujinx-Canary/releases/latest).
## Documentation

File diff suppressed because it is too large Load Diff

View File

@@ -18,13 +18,13 @@ To merge pull requests, you must have write permissions in the repository.
## Pull Request Ownership
Every pull request will have automatically have labels and reviewers assigned. The label not only indicates the code segment which the change touches but also the area reviewers to be assigned.
Every pull request will automatically have labels and reviewers assigned. The label not only indicates the code segment which the change touches but also the area reviewers to be assigned.
If during the code review process a merge conflict occurs, the PR author is responsible for its resolution. Help will be provided if necessary although GitHub makes this easier by allowing simple conflict resolution using the [conflict-editor](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github).
## Pull Request Builds
When submitting a PR to the `GreemDev/Ryujinx` repository, various builds will run validating many areas to ensure we keep developer productivity and product quality high. These various workflows can be tracked in the [Actions](https://github.com/GreemDev/Ryujinx/actions) tab of the repository. If the job continues to completion, the build artifacts will be uploaded and posted as a comment in the PR discussion.
When submitting a PR to the `Ryubing/Ryujinx` repository, various builds will run validating many areas to ensure we keep developer productivity and product quality high. These various workflows can be tracked in the [Actions](https://github.com/Ryubing/Ryujinx/actions) tab of the repository. If the job continues to completion, the build artifacts will be uploaded and posted as a comment in the PR discussion.
## Review Turnaround Times
@@ -42,7 +42,7 @@ Anyone with write access can merge a pull request manually when the following co
* The PR has been approved by two reviewers and any other objections are addressed.
* You can request follow up reviews from the original reviewers if they requested changes.
* The PR successfully builds and passes all tests in the Continuous Integration (CI) system. In case of failures, refer to the [Actions](https://github.com/GreemDev/Ryujinx/actions) tab of your PR.
* The PR successfully builds and passes all tests in the Continuous Integration (CI) system. In case of failures, refer to the [Actions](https://github.com/Ryubing/Ryujinx/actions) tab of your PR.
Typically, PRs are merged as one commit (squash merges). It creates a simpler history than a Merge Commit. "Special circumstances" are rare, and typically mean that there are a series of cleanly separated changes that will be too hard to understand if squashed together, or for some reason we want to preserve the ability to dissect them.

View File

@@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.Arm64
public static void RunPass(ControlFlowGraph cfg)
{
Dictionary<ulong, Operand> constants = new Dictionary<ulong, Operand>();
Dictionary<ulong, Operand> constants = new();
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
{

View File

@@ -10,7 +10,7 @@ namespace ARMeilleure.CodeGen.Linking
/// <summary>
/// Gets an empty <see cref="RelocInfo"/>.
/// </summary>
public static RelocInfo Empty { get; } = new RelocInfo(null);
public static RelocInfo Empty { get; } = new(null);
private readonly RelocEntry[] _entries;

View File

@@ -115,7 +115,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
{
NumberLocals(cfg, regMasks.RegistersCount);
AllocationContext context = new AllocationContext(stackAlloc, regMasks, _intervals.Count);
AllocationContext context = new(stackAlloc, regMasks, _intervals.Count);
BuildIntervals(cfg, context);
@@ -839,7 +839,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
{
dest.NumberLocal(_intervals.Count);
LiveInterval interval = new LiveInterval(dest);
LiveInterval interval = new(dest);
_intervals.Add(interval);
SetVisited(dest);

View File

@@ -1412,7 +1412,7 @@ namespace ARMeilleure.CodeGen.X86
_stream.Seek(0, SeekOrigin.Begin);
using RecyclableMemoryStream codeStream = MemoryStreamManager.Shared.GetStream();
Assembler assembler = new Assembler(codeStream, HasRelocs);
Assembler assembler = new(codeStream, HasRelocs);
bool hasRelocs = HasRelocs;
int relocIndex = 0;
@@ -1471,7 +1471,7 @@ namespace ARMeilleure.CodeGen.X86
_stream.CopyTo(codeStream);
byte[] code = codeStream.ToArray();
RelocInfo relocInfo = new RelocInfo(relocEntries);
RelocInfo relocInfo = new(relocEntries);
return (code, relocInfo);
}

View File

@@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.X86
public static void RunPass(ControlFlowGraph cfg)
{
Dictionary<ulong, Operand> constants = new Dictionary<ulong, Operand>();
Dictionary<ulong, Operand> constants = new();
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
{

View File

@@ -130,12 +130,12 @@ namespace ARMeilleure.Common
if (count > _count)
{
long* oldMask = _masks;
Span<long> oldSpan = new Span<long>(_masks, _count);
Span<long> oldSpan = new(_masks, _count);
_masks = _allocator.Allocate<long>((uint)count);
_count = count;
Span<long> newSpan = new Span<long>(_masks, _count);
Span<long> newSpan = new(_masks, _count);
oldSpan.CopyTo(newSpan);
newSpan[oldSpan.Length..].Clear();

View File

@@ -69,7 +69,7 @@ namespace ARMeilleure.Decoders.Optimizations
}
}
List<Block> newBlocks = new List<Block>(blocks.Count);
List<Block> newBlocks = new(blocks.Count);
// Finally, rebuild decoded block list, ignoring blocks outside the contiguous range.
for (int i = 0; i < blocks.Count; i++)

View File

@@ -285,7 +285,7 @@ namespace ARMeilleure.Diagnostics
public static string GetDump(ControlFlowGraph cfg)
{
IRDumper dumper = new IRDumper(1);
IRDumper dumper = new(1);
for (BasicBlock block = cfg.Blocks.First; block != null; block = block.ListNext)
{

View File

@@ -304,7 +304,7 @@ namespace ARMeilleure.IntermediateRepresentation
ushort newCount = checked((ushort)(count + 1));
ushort newCapacity = (ushort)Math.Min(capacity * 2, ushort.MaxValue);
Span<T> oldSpan = new Span<T>(data, count);
Span<T> oldSpan = new(data, count);
capacity = newCapacity;
data = Allocators.References.Allocate<T>(capacity);
@@ -338,7 +338,7 @@ namespace ARMeilleure.IntermediateRepresentation
throw new OverflowException();
}
Span<T> oldSpan = new Span<T>(data, (int)count);
Span<T> oldSpan = new(data, (int)count);
capacity = newCapacity;
data = Allocators.References.Allocate<T>(capacity);
@@ -352,7 +352,7 @@ namespace ARMeilleure.IntermediateRepresentation
private static void Remove<T>(in T item, ref T* data, ref ushort count) where T : unmanaged
{
Span<T> span = new Span<T>(data, count);
Span<T> span = new(data, count);
for (int i = 0; i < span.Length; i++)
{
@@ -372,7 +372,7 @@ namespace ARMeilleure.IntermediateRepresentation
private static void Remove<T>(in T item, ref T* data, ref uint count) where T : unmanaged
{
Span<T> span = new Span<T>(data, (int)count);
Span<T> span = new(data, (int)count);
for (int i = 0; i < span.Length; i++)
{

View File

@@ -47,8 +47,8 @@ namespace ARMeilleure.Translation
{
RemoveUnreachableBlocks(Blocks);
HashSet<BasicBlock> visited = new HashSet<BasicBlock>();
Stack<BasicBlock> blockStack = new Stack<BasicBlock>();
HashSet<BasicBlock> visited = new();
Stack<BasicBlock> blockStack = new();
Array.Resize(ref _postOrderBlocks, Blocks.Count);
Array.Resize(ref _postOrderMap, Blocks.Count);
@@ -88,8 +88,8 @@ namespace ARMeilleure.Translation
private void RemoveUnreachableBlocks(IntrusiveList<BasicBlock> blocks)
{
HashSet<BasicBlock> visited = new HashSet<BasicBlock>();
Queue<BasicBlock> workQueue = new Queue<BasicBlock>();
HashSet<BasicBlock> visited = new();
Queue<BasicBlock> workQueue = new();
visited.Add(Entry);
workQueue.Enqueue(Entry);

View File

@@ -750,7 +750,7 @@ namespace ARMeilleure.Translation.PTC
UnwindInfo unwindInfo,
bool highCq)
{
CompiledFunction cFunc = new CompiledFunction(code, unwindInfo, RelocInfo.Empty);
CompiledFunction cFunc = new(code, unwindInfo, RelocInfo.Empty);
GuestFunction gFunc = cFunc.MapWithPointer<GuestFunction>(out nint gFuncPointer);
return new TranslatedFunction(gFunc, gFuncPointer, callCounter, guestSize, highCq);
@@ -945,7 +945,7 @@ namespace ARMeilleure.Translation.PTC
WriteCode(code.AsSpan());
// WriteReloc.
using BinaryWriter relocInfoWriter = new BinaryWriter(_relocsStream, EncodingCache.UTF8NoBOM, true);
using BinaryWriter relocInfoWriter = new(_relocsStream, EncodingCache.UTF8NoBOM, true);
foreach (RelocEntry entry in relocInfo.Entries)
{
@@ -955,7 +955,7 @@ namespace ARMeilleure.Translation.PTC
}
// WriteUnwindInfo.
using BinaryWriter unwindInfoWriter = new BinaryWriter(_unwindInfosStream, EncodingCache.UTF8NoBOM, true);
using BinaryWriter unwindInfoWriter = new(_unwindInfosStream, EncodingCache.UTF8NoBOM, true);
unwindInfoWriter.Write(unwindInfo.PushEntries.Length);

View File

@@ -111,7 +111,7 @@ namespace ARMeilleure.Translation.PTC
public ConcurrentQueue<(ulong address, FuncProfile funcProfile)> GetProfiledFuncsToTranslate(TranslatorCache<TranslatedFunction> funcs)
{
ConcurrentQueue<(ulong address, FuncProfile funcProfile)> profiledFuncsToTranslate = new ConcurrentQueue<(ulong address, FuncProfile funcProfile)>();
ConcurrentQueue<(ulong address, FuncProfile funcProfile)> profiledFuncsToTranslate = new();
foreach (KeyValuePair<ulong, FuncProfile> profiledFunc in ProfiledFuncs)
{

View File

@@ -95,7 +95,7 @@ namespace ARMeilleure.Translation
// This is required because we have a implicit context load at the start of the function,
// but if there is a jump to the start of the function, the context load would trash the modified values.
// Here we insert a new entry block that will jump to the existing entry block.
BasicBlock newEntry = new BasicBlock(cfg.Blocks.Count);
BasicBlock newEntry = new(cfg.Blocks.Count);
cfg.UpdateEntry(newEntry);
}

View File

@@ -47,7 +47,7 @@ namespace ARMeilleure.Translation
DefMap[] globalDefs = new DefMap[cfg.Blocks.Count];
Operand[] localDefs = new Operand[cfg.LocalsCount + RegisterConsts.TotalCount];
Queue<BasicBlock> dfPhiBlocks = new Queue<BasicBlock>();
Queue<BasicBlock> dfPhiBlocks = new();
for (BasicBlock block = cfg.Blocks.First; block != null; block = block.ListNext)
{

View File

@@ -222,7 +222,7 @@ namespace ARMeilleure.Translation
internal TranslatedFunction Translate(ulong address, ExecutionMode mode, bool highCq, bool singleStep = false)
{
ArmEmitterContext context = new ArmEmitterContext(
ArmEmitterContext context = new(
Memory,
CountTable,
FunctionTable,

View File

@@ -142,7 +142,7 @@ namespace ARMeilleure.Translation
/// <returns>Generated <see cref="DispatchStub"/></returns>
private nint GenerateDispatchStub()
{
EmitterContext context = new EmitterContext();
EmitterContext context = new();
Operand lblFallback = Label();
Operand lblEnd = Label();
@@ -200,7 +200,7 @@ namespace ARMeilleure.Translation
/// <returns>Generated <see cref="SlowDispatchStub"/></returns>
private nint GenerateSlowDispatchStub()
{
EmitterContext context = new EmitterContext();
EmitterContext context = new();
// Load the target guest address from the native context.
Operand nativeContext = context.LoadArgument(OperandType.I64, 0);
@@ -251,7 +251,7 @@ namespace ARMeilleure.Translation
/// <returns><see cref="DispatchLoop"/> function</returns>
private DispatcherFunction GenerateDispatchLoop()
{
EmitterContext context = new EmitterContext();
EmitterContext context = new();
Operand beginLbl = Label();
Operand endLbl = Label();
@@ -292,7 +292,7 @@ namespace ARMeilleure.Translation
/// <returns><see cref="ContextWrapper"/> function</returns>
private WrapperFunction GenerateContextWrapper()
{
EmitterContext context = new EmitterContext();
EmitterContext context = new();
Operand nativeContext = context.LoadArgument(OperandType.I64, 0);
Operand guestMethod = context.LoadArgument(OperandType.I64, 1);

View File

@@ -436,7 +436,7 @@ namespace Ryujinx.Audio.Renderer.Server
return result;
}
PoolMapper poolMapper = new PoolMapper(_processHandle, _memoryPools, _behaviourContext.IsMemoryPoolForceMappingEnabled());
PoolMapper poolMapper = new(_processHandle, _memoryPools, _behaviourContext.IsMemoryPoolForceMappingEnabled());
result = stateUpdater.UpdateVoices(_voiceContext, poolMapper);

View File

@@ -83,7 +83,7 @@ namespace Ryujinx.BuildValidationTasks
if (isGitRunner && encounteredIssue)
throw new JsonException("1 or more locales are invalid!");
JsonSerializerOptions jsonOptions = new JsonSerializerOptions()
JsonSerializerOptions jsonOptions = new()
{
WriteIndented = true,
NewLine = "\n",

View File

@@ -164,7 +164,7 @@ namespace Ryujinx.Common.Extensions
// Not enough data in the current segment, try to peek for the data we need.
T buffer = default;
Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
Span<byte> tempSpan = new(&buffer, sizeof(T));
if (!reader.TryCopyTo(tempSpan))
{

View File

@@ -105,6 +105,7 @@ namespace Ryujinx.Common
"0100b04011742000", // Monster Hunter Rise
//Mario Franchise
"010021d00812a000", // Arcade Archives VS. SUPER MARIO BROS.
"01006d0017f7a000", // Mario & Luigi: Brothership
"010003000e146000", // Mario & Sonic at the Olympic Games Tokyo 2020
"010067300059a000", // Mario + Rabbids: Kingdom Battle
@@ -212,32 +213,41 @@ namespace Ryujinx.Common
//Misc Games
"010056e00853a000", // A Hat in Time
"0100fd1014726000", // Baldurs Gate: Dark Alliance
"0100c6800b934000", // Brawlhalla
"0100dbf01000a000", // Burnout Paradise Remastered
"0100744001588000", // Cars 3: Driven to Win
"0100b41013c82000", // Cruis'n Blast
"010085900337e000", // Death Squared
"01001b300b9be000", // Diablo III: Eternal Collection
"010027400cdc6000", // Divinity Original 2 - Definitive Edition
"01008c8012920000", // Dying Light Platinum Edition
"01001cc01b2d4000", // Goat Simulator 3
"01003620068ea000", // Hand of Fate 2
"010085500130a000", // Lego City: Undercover
"010073c01af34000", // LEGO Horizon Adventures
"0100d71004694000", // Minecraft
"01007430037f6000", // Monopoly
"0100853015e86000", // No Man's Sky
"01007bb017812000", // Portal
"0100abd01785c000", // Portal 2
"01008e200c5c2000", // Muse Dash
"01007820196a6000", // Red Dead Redemption
"0100e8300a67a000", // Risk
"01002f7013224000", // Rune Factory 5
"01008d100d43e000", // Saints Row IV
"0100de600beee000", // Saints Row: The Third - The Full Package
"01001180021fa000", // Shovel Knight: Specter of Torment
"0100e65002bb8000", // Stardew Valley
"0100d7a01b7a2000", // Star Wars: Bounty Hunter
"0100800015926000", // Suika Game
"01007ad00013e000", // Super Bomberman R
"0100e46006708000", // Terraria
"0100605008268000", // Titan Quest
"01000a10041ea000", // The Elder Scrolls V: Skyrim
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
"010080b00ad66000", // Undertale
"010069401adb8000", // Unicorn Overlord
"01005c600ac68000", // Valkyria Chronicles 4
"0100534009ff2000", // Yonder - The cloud catcher chronicles
];
}

View File

@@ -91,7 +91,7 @@ namespace Ryujinx.Common
return null;
}
using StreamReader reader = new StreamReader(stream);
using StreamReader reader = new(stream);
return reader.ReadToEnd();
}
@@ -103,7 +103,7 @@ namespace Ryujinx.Common
return null;
}
using StreamReader reader = new StreamReader(stream);
using StreamReader reader = new(stream);
return await reader.ReadToEndAsync();
}

View File

@@ -9,7 +9,7 @@ namespace Ryujinx.Common.Utilities
public static void CopyDirectory(string sourceDir, string destinationDir, bool recursive)
{
// Get information about the source directory
DirectoryInfo dir = new DirectoryInfo(sourceDir);
DirectoryInfo dir = new(sourceDir);
// Check if the source directory exists
if (!dir.Exists)
@@ -49,7 +49,7 @@ namespace Ryujinx.Common.Utilities
public static string SanitizeFileName(string fileName)
{
HashSet<char> reservedChars = new HashSet<char>(Path.GetInvalidFileNameChars());
HashSet<char> reservedChars = new(Path.GetInvalidFileNameChars());
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
}
}

View File

@@ -19,7 +19,7 @@ namespace Ryujinx.Common.Utilities
public static string Format(MessagePackObject obj)
{
IndentedStringBuilder builder = new IndentedStringBuilder();
IndentedStringBuilder builder = new();
FormatMsgPackObj(obj, builder);

View File

@@ -1,6 +1,7 @@
using Gommon;
using System;
using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
namespace Ryujinx.Common.Utilities
@@ -18,7 +19,7 @@ namespace Ryujinx.Common.Utilities
{
while (CyclingEnabled)
{
await Task.Delay(15);
await Task.Delay(20);
Tick();
}
});
@@ -32,29 +33,47 @@ namespace Ryujinx.Common.Utilities
public static float Speed { get; set; } = 1;
private static readonly Lock _lock = new();
public static Color Color { get; private set; } = Color.Blue;
private static Color _color = Color.Blue;
public static ref Color Color
{
get
{
lock (_lock)
{
return ref _color;
}
}
}
public static void Tick()
{
Color = HsbToRgb((Color.GetHue() + Speed) / 360);
lock (_lock)
{
_color = HsbToRgb((_color.GetHue() + Speed) / 360);
UpdatedHandler.Call(Color.ToArgb());
_updatedHandler.Call(_color.ToArgb());
}
}
public static void Reset()
{
Color = Color.Blue;
UpdatedHandler.Clear();
_updatedHandler.Clear();
lock (_lock)
_color = Color.Blue;
}
public static event Action<int> Updated
{
add => UpdatedHandler.Add(value);
remove => UpdatedHandler.Remove(value);
add => _updatedHandler.Add(value);
remove => _updatedHandler.Remove(value);
}
internal static Event<int> UpdatedHandler = new();
private static readonly Event<int> _updatedHandler = new();
private static Color HsbToRgb(float hue, float saturation = 1, float brightness = 1)
{

View File

@@ -46,7 +46,7 @@ namespace Ryujinx.Common.Utilities
{
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
{
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
XCIFileTrimmer trimmer = new(filename, log);
return trimmer.CanBeTrimmed;
}
@@ -57,7 +57,7 @@ namespace Ryujinx.Common.Utilities
{
if (Path.GetExtension(filename).Equals(".XCI", StringComparison.InvariantCultureIgnoreCase))
{
XCIFileTrimmer trimmer = new XCIFileTrimmer(filename, log);
XCIFileTrimmer trimmer = new(filename, log);
return trimmer.CanBeUntrimmed;
}
@@ -267,7 +267,7 @@ namespace Ryujinx.Common.Utilities
try
{
FileInfo info = new FileInfo(Filename);
FileInfo info = new(Filename);
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
try
@@ -288,7 +288,7 @@ namespace Ryujinx.Common.Utilities
return OperationOutcome.FileSizeChanged;
}
FileStream outfileStream = new FileStream(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
FileStream outfileStream = new(_filename, FileMode.Open, FileAccess.Write, FileShare.Write);
try
{
@@ -327,7 +327,7 @@ namespace Ryujinx.Common.Utilities
{
Log?.Write(LogType.Info, "Untrimming...");
FileInfo info = new FileInfo(Filename);
FileInfo info = new(Filename);
if ((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
try
@@ -348,7 +348,7 @@ namespace Ryujinx.Common.Utilities
return OperationOutcome.FileSizeChanged;
}
FileStream outfileStream = new FileStream(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
FileStream outfileStream = new(_filename, FileMode.Append, FileAccess.Write, FileShare.Write);
long bytesToWriteB = UntrimmedFileSizeB - FileSizeB;
try

View File

@@ -49,7 +49,7 @@ namespace ARMeilleure.Common
public TableSparseBlock(ulong size, Action<IntPtr> ensureMapped, PageInitDelegate pageInit)
{
SparseMemoryBlock block = new SparseMemoryBlock(size, pageInit, null);
SparseMemoryBlock block = new(size, pageInit, null);
_trackingEvent = (ulong address, ulong size, bool write) =>
{
@@ -363,7 +363,7 @@ namespace ARMeilleure.Common
/// <returns>The new sparse block that was added</returns>
private TableSparseBlock ReserveNewSparseBlock()
{
TableSparseBlock block = new TableSparseBlock(_sparseBlockSize, EnsureMapped, InitLeafPage);
TableSparseBlock block = new(_sparseBlockSize, EnsureMapped, InitLeafPage);
_sparseReserved.Add(block);
_sparseReservedOffset = 0;
@@ -416,7 +416,7 @@ namespace ARMeilleure.Common
IntPtr address = (IntPtr)NativeAllocator.Instance.Allocate((uint)size);
page = new AddressTablePage(false, address);
Span<T> span = new Span<T>((void*)page.Address, length);
Span<T> span = new((void*)page.Address, length);
span.Fill(fill);
}

View File

@@ -340,7 +340,7 @@ namespace Ryujinx.Cpu.Jit
{
int pages = GetPagesCount(va, (uint)size, out va);
List<MemoryRange> regions = new List<MemoryRange>();
List<MemoryRange> regions = new();
ulong regionStart = GetPhysicalAddressChecked(va);
ulong regionSize = PageSize;

View File

@@ -443,7 +443,7 @@ namespace Ryujinx.Cpu.Jit
return null;
}
List<HostMemoryRange> regions = new List<HostMemoryRange>();
List<HostMemoryRange> regions = new();
ulong endVa = va + size;
try

View File

@@ -342,7 +342,7 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
public readonly void Cset(Operand rd, ArmCondition condition)
{
Operand zr = new Operand(ZrRegister, RegisterType.Integer, rd.Type);
Operand zr = new(ZrRegister, RegisterType.Integer, rd.Type);
Csinc(rd, zr, zr, (ArmCondition)((int)condition ^ 1));
}
@@ -857,7 +857,7 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
public readonly void PrfmI(Operand rn, int imm, uint type, uint target, uint policy)
{
Operand rt = new Operand((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
Operand rt = new((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
WriteInstruction(0xf9800000u | (EncodeUImm12(imm, 3) << 10), rt, rn);
}
@@ -868,7 +868,7 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
public readonly void Prfum(Operand rn, int imm, uint type, uint target, uint policy)
{
Operand rt = new Operand((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
Operand rt = new((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
WriteInstruction(0xf8800000u | (EncodeSImm9(imm) << 12), rt, rn);
}

View File

@@ -40,7 +40,7 @@ namespace Ryujinx.Cpu
Size = size;
_freeRanges = new List<Range>
{
new Range(0, size),
new(0, size),
};
}
@@ -84,7 +84,7 @@ namespace Ryujinx.Cpu
private void InsertFreeRange(ulong offset, ulong size)
{
Range range = new Range(offset, size);
Range range = new(offset, size);
int index = _freeRanges.BinarySearch(range);
if (index < 0)
{
@@ -97,7 +97,7 @@ namespace Ryujinx.Cpu
private void InsertFreeRangeComingled(ulong offset, ulong size)
{
ulong endOffset = offset + size;
Range range = new Range(offset, size);
Range range = new(offset, size);
int index = _freeRanges.BinarySearch(range);
if (index < 0)
{
@@ -214,7 +214,7 @@ namespace Ryujinx.Cpu
ulong blockAlignedSize = BitUtils.AlignUp(size, _blockAlignment);
MemoryBlock memory = new MemoryBlock(blockAlignedSize, _allocationFlags);
MemoryBlock memory = new(blockAlignedSize, _allocationFlags);
T newBlock = createBlock(memory, blockAlignedSize);
InsertBlock(newBlock);

View File

@@ -2,7 +2,7 @@ namespace Ryujinx.Graphics.GAL
{
public readonly struct ComputeSize
{
public readonly static ComputeSize VtgAsCompute = new ComputeSize(32, 32, 1);
public readonly static ComputeSize VtgAsCompute = new(32, 32, 1);
public readonly int X;
public readonly int Y;

View File

@@ -337,7 +337,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
{
if (IsGpuThread())
{
ThreadedTexture texture = new ThreadedTexture(this, info);
ThreadedTexture texture = new(this, info);
New<CreateTextureCommand>().Set(Ref(texture), info);
QueueCommand();
@@ -345,7 +345,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
}
else
{
ThreadedTexture texture = new ThreadedTexture(this, info)
ThreadedTexture texture = new(this, info)
{
Base = _baseRenderer.CreateTexture(info),
};
@@ -355,7 +355,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
}
public ITextureArray CreateTextureArray(int size, bool isBuffer)
{
ThreadedTextureArray textureArray = new ThreadedTextureArray(this);
ThreadedTextureArray textureArray = new(this);
New<CreateTextureArrayCommand>().Set(Ref(textureArray), size, isBuffer);
QueueCommand();
@@ -414,7 +414,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
public IProgram LoadProgramBinary(byte[] programBinary, bool hasFragmentShader, ShaderInfo info)
{
ThreadedProgram program = new ThreadedProgram(this);
ThreadedProgram program = new(this);
BinaryProgramRequest request = new(program, programBinary, hasFragmentShader, info);
Programs.Add(request);

View File

@@ -245,7 +245,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
int srcStride = (int)_state.State.PitchIn;
int dstStride = (int)_state.State.PitchOut;
OffsetCalculator srcCalculator = new OffsetCalculator(
OffsetCalculator srcCalculator = new(
src.Width,
src.Height,
srcStride,
@@ -254,7 +254,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
src.MemoryLayout.UnpackGobBlocksInZ(),
srcBpp);
OffsetCalculator dstCalculator = new OffsetCalculator(
OffsetCalculator dstCalculator = new(
dst.Width,
dst.Height,
dstStride,

View File

@@ -208,7 +208,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.InlineToMemory
}
}
OffsetCalculator dstCalculator = new OffsetCalculator(
OffsetCalculator dstCalculator = new(
_dstWidth,
_dstHeight,
_dstStride,

View File

@@ -10,206 +10,206 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender
{
public static readonly AdvancedBlendUcode[] Table = new AdvancedBlendUcode[]
{
new AdvancedBlendUcode(AdvancedBlendOp.PlusClamped, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusClampedPremul),
new AdvancedBlendUcode(AdvancedBlendOp.PlusClampedAlpha, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusClampedAlphaPremul),
new AdvancedBlendUcode(AdvancedBlendOp.PlusDarker, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusDarkerPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMultiplyPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedScreenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedOverlayPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedDarkenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLightenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedColorDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedColorBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHardLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedSoftLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedDifferencePremul),
new AdvancedBlendUcode(AdvancedBlendOp.Minus, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMinusPremul),
new AdvancedBlendUcode(AdvancedBlendOp.MinusClamped, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMinusClampedPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedExclusionPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Contrast, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedContrastPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertPremul),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertRGBPremul),
new AdvancedBlendUcode(AdvancedBlendOp.InvertOvg, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertOvgPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedVividLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPinLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHardMixPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Red, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedRedPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Green, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedGreenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Blue, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedBluePremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslHuePremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslSaturationPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslColorPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslLuminosityPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Src, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Dst, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcOverPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstOverPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcInPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstIn, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstInPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcOutPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstOut, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstOutPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcAtopPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstAtopPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Disjoint, true, GenDisjointXorPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Plus, AdvancedBlendOverlap.Disjoint, true, GenDisjointPlusPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Disjoint, true, GenDisjointMultiplyPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Disjoint, true, GenDisjointScreenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Disjoint, true, GenDisjointOverlayPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Disjoint, true, GenDisjointDarkenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Disjoint, true, GenDisjointLightenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Disjoint, true, GenDisjointColorDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Disjoint, true, GenDisjointColorBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointHardLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointSoftLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Disjoint, true, GenDisjointDifferencePremul),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Disjoint, true, GenDisjointExclusionPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Disjoint, true, GenDisjointInvertPremul),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Disjoint, true, GenDisjointInvertRGBPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointVividLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointPinLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Disjoint, true, GenDisjointHardMixPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslHuePremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslSaturationPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslColorPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslLuminosityPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Src, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Dst, AdvancedBlendOverlap.Conjoint, true, GenConjointDstPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcOverPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Conjoint, true, GenConjointDstOverPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcInPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstIn, AdvancedBlendOverlap.Conjoint, true, GenConjointDstInPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcOutPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstOut, AdvancedBlendOverlap.Conjoint, true, GenConjointDstOutPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcAtopPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Conjoint, true, GenConjointDstAtopPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Conjoint, true, GenConjointXorPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Conjoint, true, GenConjointMultiplyPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Conjoint, true, GenConjointScreenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Conjoint, true, GenConjointOverlayPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Conjoint, true, GenConjointDarkenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Conjoint, true, GenConjointLightenPremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Conjoint, true, GenConjointColorDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Conjoint, true, GenConjointColorBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Conjoint, true, GenConjointHardLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Conjoint, true, GenConjointSoftLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Conjoint, true, GenConjointDifferencePremul),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Conjoint, true, GenConjointExclusionPremul),
new AdvancedBlendUcode(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Conjoint, true, GenConjointInvertPremul),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Conjoint, true, GenConjointInvertRGBPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearDodgePremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearBurnPremul),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Conjoint, true, GenConjointVividLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Conjoint, true, GenConjointPinLightPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Conjoint, true, GenConjointHardMixPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Conjoint, true, GenConjointHslHuePremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Conjoint, true, GenConjointHslSaturationPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Conjoint, true, GenConjointHslColorPremul),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Conjoint, true, GenConjointHslLuminosityPremul),
new AdvancedBlendUcode(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDstOver),
new AdvancedBlendUcode(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcIn),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcOut),
new AdvancedBlendUcode(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcAtop),
new AdvancedBlendUcode(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDstAtop),
new AdvancedBlendUcode(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedXor),
new AdvancedBlendUcode(AdvancedBlendOp.PlusClamped, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusClamped),
new AdvancedBlendUcode(AdvancedBlendOp.PlusClampedAlpha, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusClampedAlpha),
new AdvancedBlendUcode(AdvancedBlendOp.PlusDarker, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusDarker),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMultiply),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedScreen),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedOverlay),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDarken),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLighten),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedColorDodge),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedColorBurn),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHardLight),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSoftLight),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDifference),
new AdvancedBlendUcode(AdvancedBlendOp.Minus, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMinus),
new AdvancedBlendUcode(AdvancedBlendOp.MinusClamped, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMinusClamped),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedExclusion),
new AdvancedBlendUcode(AdvancedBlendOp.Contrast, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedContrast),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedInvertRGB),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearDodge),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearBurn),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedVividLight),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearLight),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPinLight),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHardMix),
new AdvancedBlendUcode(AdvancedBlendOp.Red, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedRed),
new AdvancedBlendUcode(AdvancedBlendOp.Green, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedGreen),
new AdvancedBlendUcode(AdvancedBlendOp.Blue, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedBlue),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslHue),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslSaturation),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslColor),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslLuminosity),
new AdvancedBlendUcode(AdvancedBlendOp.Src, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrc),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcOver),
new AdvancedBlendUcode(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Disjoint, false, GenDisjointDstOver),
new AdvancedBlendUcode(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcIn),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcOut),
new AdvancedBlendUcode(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcAtop),
new AdvancedBlendUcode(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Disjoint, false, GenDisjointDstAtop),
new AdvancedBlendUcode(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Disjoint, false, GenDisjointXor),
new AdvancedBlendUcode(AdvancedBlendOp.Plus, AdvancedBlendOverlap.Disjoint, false, GenDisjointPlus),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Disjoint, false, GenDisjointMultiply),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Disjoint, false, GenDisjointScreen),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Disjoint, false, GenDisjointOverlay),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Disjoint, false, GenDisjointDarken),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Disjoint, false, GenDisjointLighten),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Disjoint, false, GenDisjointColorDodge),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Disjoint, false, GenDisjointColorBurn),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointHardLight),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointSoftLight),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Disjoint, false, GenDisjointDifference),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Disjoint, false, GenDisjointExclusion),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Disjoint, false, GenDisjointInvertRGB),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearDodge),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearBurn),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointVividLight),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearLight),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointPinLight),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Disjoint, false, GenDisjointHardMix),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslHue),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslSaturation),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslColor),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslLuminosity),
new AdvancedBlendUcode(AdvancedBlendOp.Src, AdvancedBlendOverlap.Conjoint, false, GenConjointSrc),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcOver),
new AdvancedBlendUcode(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Conjoint, false, GenConjointDstOver),
new AdvancedBlendUcode(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcIn),
new AdvancedBlendUcode(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcOut),
new AdvancedBlendUcode(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcAtop),
new AdvancedBlendUcode(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Conjoint, false, GenConjointDstAtop),
new AdvancedBlendUcode(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Conjoint, false, GenConjointXor),
new AdvancedBlendUcode(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Conjoint, false, GenConjointMultiply),
new AdvancedBlendUcode(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Conjoint, false, GenConjointScreen),
new AdvancedBlendUcode(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Conjoint, false, GenConjointOverlay),
new AdvancedBlendUcode(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Conjoint, false, GenConjointDarken),
new AdvancedBlendUcode(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Conjoint, false, GenConjointLighten),
new AdvancedBlendUcode(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Conjoint, false, GenConjointColorDodge),
new AdvancedBlendUcode(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Conjoint, false, GenConjointColorBurn),
new AdvancedBlendUcode(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Conjoint, false, GenConjointHardLight),
new AdvancedBlendUcode(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Conjoint, false, GenConjointSoftLight),
new AdvancedBlendUcode(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Conjoint, false, GenConjointDifference),
new AdvancedBlendUcode(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Conjoint, false, GenConjointExclusion),
new AdvancedBlendUcode(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Conjoint, false, GenConjointInvertRGB),
new AdvancedBlendUcode(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearDodge),
new AdvancedBlendUcode(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearBurn),
new AdvancedBlendUcode(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Conjoint, false, GenConjointVividLight),
new AdvancedBlendUcode(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearLight),
new AdvancedBlendUcode(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Conjoint, false, GenConjointPinLight),
new AdvancedBlendUcode(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Conjoint, false, GenConjointHardMix),
new AdvancedBlendUcode(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Conjoint, false, GenConjointHslHue),
new AdvancedBlendUcode(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Conjoint, false, GenConjointHslSaturation),
new AdvancedBlendUcode(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Conjoint, false, GenConjointHslColor),
new AdvancedBlendUcode(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Conjoint, false, GenConjointHslLuminosity),
new(AdvancedBlendOp.PlusClamped, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusClampedPremul),
new(AdvancedBlendOp.PlusClampedAlpha, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusClampedAlphaPremul),
new(AdvancedBlendOp.PlusDarker, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPlusDarkerPremul),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMultiplyPremul),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedScreenPremul),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedOverlayPremul),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedDarkenPremul),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLightenPremul),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedColorDodgePremul),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedColorBurnPremul),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHardLightPremul),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedSoftLightPremul),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedDifferencePremul),
new(AdvancedBlendOp.Minus, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMinusPremul),
new(AdvancedBlendOp.MinusClamped, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedMinusClampedPremul),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedExclusionPremul),
new(AdvancedBlendOp.Contrast, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedContrastPremul),
new(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertPremul),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertRGBPremul),
new(AdvancedBlendOp.InvertOvg, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedInvertOvgPremul),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearDodgePremul),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearBurnPremul),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedVividLightPremul),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedLinearLightPremul),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedPinLightPremul),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHardMixPremul),
new(AdvancedBlendOp.Red, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedRedPremul),
new(AdvancedBlendOp.Green, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedGreenPremul),
new(AdvancedBlendOp.Blue, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedBluePremul),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslHuePremul),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslSaturationPremul),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslColorPremul),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Uncorrelated, true, GenUncorrelatedHslLuminosityPremul),
new(AdvancedBlendOp.Src, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcPremul),
new(AdvancedBlendOp.Dst, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstPremul),
new(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcOverPremul),
new(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstOverPremul),
new(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcInPremul),
new(AdvancedBlendOp.DstIn, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstInPremul),
new(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcOutPremul),
new(AdvancedBlendOp.DstOut, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstOutPremul),
new(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Disjoint, true, GenDisjointSrcAtopPremul),
new(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Disjoint, true, GenDisjointDstAtopPremul),
new(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Disjoint, true, GenDisjointXorPremul),
new(AdvancedBlendOp.Plus, AdvancedBlendOverlap.Disjoint, true, GenDisjointPlusPremul),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Disjoint, true, GenDisjointMultiplyPremul),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Disjoint, true, GenDisjointScreenPremul),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Disjoint, true, GenDisjointOverlayPremul),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Disjoint, true, GenDisjointDarkenPremul),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Disjoint, true, GenDisjointLightenPremul),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Disjoint, true, GenDisjointColorDodgePremul),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Disjoint, true, GenDisjointColorBurnPremul),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointHardLightPremul),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointSoftLightPremul),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Disjoint, true, GenDisjointDifferencePremul),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Disjoint, true, GenDisjointExclusionPremul),
new(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Disjoint, true, GenDisjointInvertPremul),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Disjoint, true, GenDisjointInvertRGBPremul),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearDodgePremul),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearBurnPremul),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointVividLightPremul),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointLinearLightPremul),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Disjoint, true, GenDisjointPinLightPremul),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Disjoint, true, GenDisjointHardMixPremul),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslHuePremul),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslSaturationPremul),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslColorPremul),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Disjoint, true, GenDisjointHslLuminosityPremul),
new(AdvancedBlendOp.Src, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcPremul),
new(AdvancedBlendOp.Dst, AdvancedBlendOverlap.Conjoint, true, GenConjointDstPremul),
new(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcOverPremul),
new(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Conjoint, true, GenConjointDstOverPremul),
new(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcInPremul),
new(AdvancedBlendOp.DstIn, AdvancedBlendOverlap.Conjoint, true, GenConjointDstInPremul),
new(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcOutPremul),
new(AdvancedBlendOp.DstOut, AdvancedBlendOverlap.Conjoint, true, GenConjointDstOutPremul),
new(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Conjoint, true, GenConjointSrcAtopPremul),
new(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Conjoint, true, GenConjointDstAtopPremul),
new(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Conjoint, true, GenConjointXorPremul),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Conjoint, true, GenConjointMultiplyPremul),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Conjoint, true, GenConjointScreenPremul),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Conjoint, true, GenConjointOverlayPremul),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Conjoint, true, GenConjointDarkenPremul),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Conjoint, true, GenConjointLightenPremul),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Conjoint, true, GenConjointColorDodgePremul),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Conjoint, true, GenConjointColorBurnPremul),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Conjoint, true, GenConjointHardLightPremul),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Conjoint, true, GenConjointSoftLightPremul),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Conjoint, true, GenConjointDifferencePremul),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Conjoint, true, GenConjointExclusionPremul),
new(AdvancedBlendOp.Invert, AdvancedBlendOverlap.Conjoint, true, GenConjointInvertPremul),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Conjoint, true, GenConjointInvertRGBPremul),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearDodgePremul),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearBurnPremul),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Conjoint, true, GenConjointVividLightPremul),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Conjoint, true, GenConjointLinearLightPremul),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Conjoint, true, GenConjointPinLightPremul),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Conjoint, true, GenConjointHardMixPremul),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Conjoint, true, GenConjointHslHuePremul),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Conjoint, true, GenConjointHslSaturationPremul),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Conjoint, true, GenConjointHslColorPremul),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Conjoint, true, GenConjointHslLuminosityPremul),
new(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDstOver),
new(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcIn),
new(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcOut),
new(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSrcAtop),
new(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDstAtop),
new(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedXor),
new(AdvancedBlendOp.PlusClamped, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusClamped),
new(AdvancedBlendOp.PlusClampedAlpha, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusClampedAlpha),
new(AdvancedBlendOp.PlusDarker, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPlusDarker),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMultiply),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedScreen),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedOverlay),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDarken),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLighten),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedColorDodge),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedColorBurn),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHardLight),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedSoftLight),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedDifference),
new(AdvancedBlendOp.Minus, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMinus),
new(AdvancedBlendOp.MinusClamped, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedMinusClamped),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedExclusion),
new(AdvancedBlendOp.Contrast, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedContrast),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedInvertRGB),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearDodge),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearBurn),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedVividLight),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedLinearLight),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedPinLight),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHardMix),
new(AdvancedBlendOp.Red, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedRed),
new(AdvancedBlendOp.Green, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedGreen),
new(AdvancedBlendOp.Blue, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedBlue),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslHue),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslSaturation),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslColor),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Uncorrelated, false, GenUncorrelatedHslLuminosity),
new(AdvancedBlendOp.Src, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrc),
new(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcOver),
new(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Disjoint, false, GenDisjointDstOver),
new(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcIn),
new(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcOut),
new(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Disjoint, false, GenDisjointSrcAtop),
new(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Disjoint, false, GenDisjointDstAtop),
new(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Disjoint, false, GenDisjointXor),
new(AdvancedBlendOp.Plus, AdvancedBlendOverlap.Disjoint, false, GenDisjointPlus),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Disjoint, false, GenDisjointMultiply),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Disjoint, false, GenDisjointScreen),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Disjoint, false, GenDisjointOverlay),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Disjoint, false, GenDisjointDarken),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Disjoint, false, GenDisjointLighten),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Disjoint, false, GenDisjointColorDodge),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Disjoint, false, GenDisjointColorBurn),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointHardLight),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointSoftLight),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Disjoint, false, GenDisjointDifference),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Disjoint, false, GenDisjointExclusion),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Disjoint, false, GenDisjointInvertRGB),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearDodge),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearBurn),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointVividLight),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointLinearLight),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Disjoint, false, GenDisjointPinLight),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Disjoint, false, GenDisjointHardMix),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslHue),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslSaturation),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslColor),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Disjoint, false, GenDisjointHslLuminosity),
new(AdvancedBlendOp.Src, AdvancedBlendOverlap.Conjoint, false, GenConjointSrc),
new(AdvancedBlendOp.SrcOver, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcOver),
new(AdvancedBlendOp.DstOver, AdvancedBlendOverlap.Conjoint, false, GenConjointDstOver),
new(AdvancedBlendOp.SrcIn, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcIn),
new(AdvancedBlendOp.SrcOut, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcOut),
new(AdvancedBlendOp.SrcAtop, AdvancedBlendOverlap.Conjoint, false, GenConjointSrcAtop),
new(AdvancedBlendOp.DstAtop, AdvancedBlendOverlap.Conjoint, false, GenConjointDstAtop),
new(AdvancedBlendOp.Xor, AdvancedBlendOverlap.Conjoint, false, GenConjointXor),
new(AdvancedBlendOp.Multiply, AdvancedBlendOverlap.Conjoint, false, GenConjointMultiply),
new(AdvancedBlendOp.Screen, AdvancedBlendOverlap.Conjoint, false, GenConjointScreen),
new(AdvancedBlendOp.Overlay, AdvancedBlendOverlap.Conjoint, false, GenConjointOverlay),
new(AdvancedBlendOp.Darken, AdvancedBlendOverlap.Conjoint, false, GenConjointDarken),
new(AdvancedBlendOp.Lighten, AdvancedBlendOverlap.Conjoint, false, GenConjointLighten),
new(AdvancedBlendOp.ColorDodge, AdvancedBlendOverlap.Conjoint, false, GenConjointColorDodge),
new(AdvancedBlendOp.ColorBurn, AdvancedBlendOverlap.Conjoint, false, GenConjointColorBurn),
new(AdvancedBlendOp.HardLight, AdvancedBlendOverlap.Conjoint, false, GenConjointHardLight),
new(AdvancedBlendOp.SoftLight, AdvancedBlendOverlap.Conjoint, false, GenConjointSoftLight),
new(AdvancedBlendOp.Difference, AdvancedBlendOverlap.Conjoint, false, GenConjointDifference),
new(AdvancedBlendOp.Exclusion, AdvancedBlendOverlap.Conjoint, false, GenConjointExclusion),
new(AdvancedBlendOp.InvertRGB, AdvancedBlendOverlap.Conjoint, false, GenConjointInvertRGB),
new(AdvancedBlendOp.LinearDodge, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearDodge),
new(AdvancedBlendOp.LinearBurn, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearBurn),
new(AdvancedBlendOp.VividLight, AdvancedBlendOverlap.Conjoint, false, GenConjointVividLight),
new(AdvancedBlendOp.LinearLight, AdvancedBlendOverlap.Conjoint, false, GenConjointLinearLight),
new(AdvancedBlendOp.PinLight, AdvancedBlendOverlap.Conjoint, false, GenConjointPinLight),
new(AdvancedBlendOp.HardMix, AdvancedBlendOverlap.Conjoint, false, GenConjointHardMix),
new(AdvancedBlendOp.HslHue, AdvancedBlendOverlap.Conjoint, false, GenConjointHslHue),
new(AdvancedBlendOp.HslSaturation, AdvancedBlendOverlap.Conjoint, false, GenConjointHslSaturation),
new(AdvancedBlendOp.HslColor, AdvancedBlendOverlap.Conjoint, false, GenConjointHslColor),
new(AdvancedBlendOp.HslLuminosity, AdvancedBlendOverlap.Conjoint, false, GenConjointHslLuminosity),
};
public static string GenTable()

View File

@@ -59,7 +59,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
_registerToGroupMapping = new byte[BlockSize];
_callbacks = new Action[entries.Length];
Dictionary<string, int> fieldToDelegate = new Dictionary<string, int>();
Dictionary<string, int> fieldToDelegate = new();
for (int entryIndex = 0; entryIndex < entries.Length; entryIndex++)
{

View File

@@ -740,7 +740,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
ref ScreenScissorState scissor = ref _state.State.ScreenScissorState;
float rScale = _channel.TextureManager.RenderTargetScale;
Rectangle<float> scissorRect = new Rectangle<float>(0, 0, (scissor.X + scissor.Width) * rScale, (scissor.Y + scissor.Height) * rScale);
Rectangle<float> scissorRect = new(0, 0, (scissor.X + scissor.Width) * rScale, (scissor.Y + scissor.Height) * rScale);
viewports[index] = new Viewport(scissorRect, ViewportSwizzle.PositiveX, ViewportSwizzle.PositiveY, ViewportSwizzle.PositiveZ, ViewportSwizzle.PositiveW, 0, 1);
continue;
@@ -1281,7 +1281,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
bool enable = _state.State.BlendEnable[index];
BlendState blend = _state.State.BlendState[index];
BlendDescriptor descriptor = new BlendDescriptor(
BlendDescriptor descriptor = new(
enable,
blendConstant,
blend.ColorOp,
@@ -1309,7 +1309,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
bool enable = _state.State.BlendEnable[0];
BlendStateCommon blend = _state.State.BlendStateCommon;
BlendDescriptor descriptor = new BlendDescriptor(
BlendDescriptor descriptor = new(
enable,
blendConstant,
blend.ColorOp,

View File

@@ -82,8 +82,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
_i2mClass = new InlineToMemoryClass(context, channel, initializeState: false);
SpecializationStateUpdater spec = new SpecializationStateUpdater(context);
DrawState drawState = new DrawState();
SpecializationStateUpdater spec = new(context);
DrawState drawState = new();
_drawManager = new DrawManager(context, channel, _state, drawState, spec);
_blendManager = new AdvancedBlendManager(_state);

View File

@@ -124,7 +124,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
/// <param name="bpp">Bytes per pixel</param>
private void UnscaledFullCopy(TwodTexture src, TwodTexture dst, int w, int h, int bpp)
{
OffsetCalculator srcCalculator = new OffsetCalculator(
OffsetCalculator srcCalculator = new(
w,
h,
src.Stride,
@@ -269,8 +269,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Twod
// The source and destination textures should at least be as big as the region being requested.
// The hints will only resize within alignment constraints, so out of bound copies won't resize in most cases.
Size srcHint = new Size(srcX2, srcY2, 1);
Size dstHint = new Size(dstX2, dstY2, 1);
Size srcHint = new(srcX2, srcY2, 1);
Size dstHint = new(dstX2, dstY2, 1);
FormatInfo srcCopyTextureFormat = srcCopyTexture.Format.Convert();

View File

@@ -199,7 +199,7 @@ namespace Ryujinx.Graphics.Gpu
/// <exception cref="ArgumentException">Thrown if <paramref name="pid"/> was already registered</exception>
public void RegisterProcess(ulong pid, Cpu.IVirtualMemoryManagerTracked cpuMemory)
{
PhysicalMemory physicalMemory = new PhysicalMemory(this, cpuMemory);
PhysicalMemory physicalMemory = new(this, cpuMemory);
if (!PhysicalMemoryRegistry.TryAdd(pid, physicalMemory))
{
throw new ArgumentException("The PID was already registered", nameof(pid));

View File

@@ -277,7 +277,7 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <param name="descriptor">Last used texture descriptor</param>
public void AddShortCache(Texture texture, ref TextureDescriptor descriptor)
{
ShortTextureCacheEntry entry = new ShortTextureCacheEntry(descriptor, texture);
ShortTextureCacheEntry entry = new(descriptor, texture);
_shortCacheBuilder.Add(entry);
_shortCacheLookup.Add(entry.Descriptor, entry);
@@ -296,7 +296,7 @@ namespace Ryujinx.Graphics.Gpu.Image
{
if (texture.ShortCacheEntry != null)
{
ShortTextureCacheEntry entry = new ShortTextureCacheEntry(texture);
ShortTextureCacheEntry entry = new(texture);
_shortCacheBuilder.Add(entry);

View File

@@ -992,7 +992,7 @@ namespace Ryujinx.Graphics.Gpu.Image
bool isImage,
out bool isNew)
{
CacheEntryFromPoolKey key = new CacheEntryFromPoolKey(isImage, bindingInfo, texturePool, samplerPool);
CacheEntryFromPoolKey key = new(isImage, bindingInfo, texturePool, samplerPool);
isNew = !_cacheFromPool.TryGetValue(key, out CacheEntry entry);
@@ -1035,7 +1035,7 @@ namespace Ryujinx.Graphics.Gpu.Image
ref BufferBounds textureBufferBounds,
out bool isNew)
{
CacheEntryFromBufferKey key = new CacheEntryFromBufferKey(
CacheEntryFromBufferKey key = new(
isImage,
bindingInfo,
texturePool,

View File

@@ -947,7 +947,7 @@ namespace Ryujinx.Graphics.Gpu.Image
bool hasLayerViews = false;
bool hasMipViews = false;
List<TextureIncompatibleOverlap> incompatibleOverlaps = new List<TextureIncompatibleOverlap>();
List<TextureIncompatibleOverlap> incompatibleOverlaps = new();
for (int index = 0; index < overlapsCount; index++)
{

View File

@@ -1019,7 +1019,7 @@ namespace Ryujinx.Graphics.Gpu.Image
int endOffset = _allOffsets[viewEnd] + _sliceSizes[lastLevel];
int size = endOffset - offset;
List<RegionHandle> result = new List<RegionHandle>();
List<RegionHandle> result = new();
for (int i = 0; i < TextureRange.Count; i++)
{
@@ -1053,7 +1053,7 @@ namespace Ryujinx.Graphics.Gpu.Image
offset = _allOffsets[viewStart];
ulong maxSize = Storage.Size - (ulong)offset;
TextureGroupHandle groupHandle = new TextureGroupHandle(
TextureGroupHandle groupHandle = new(
this,
offset,
Math.Min(maxSize, (ulong)size),
@@ -1337,7 +1337,7 @@ namespace Ryujinx.Graphics.Gpu.Image
Array.Resize(ref cpuRegionHandles, count);
}
TextureGroupHandle groupHandle = new TextureGroupHandle(this, 0, Storage.Size, _views, 0, 0, 0, _allOffsets.Length, cpuRegionHandles);
TextureGroupHandle groupHandle = new(this, 0, Storage.Size, _views, 0, 0, 0, _allOffsets.Length, cpuRegionHandles);
handles = new TextureGroupHandle[] { groupHandle };
}
@@ -1355,7 +1355,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (_is3D)
{
List<TextureGroupHandle> handlesList = new List<TextureGroupHandle>();
List<TextureGroupHandle> handlesList = new();
for (int i = 0; i < levelHandles; i++)
{
@@ -1438,8 +1438,8 @@ namespace Ryujinx.Graphics.Gpu.Image
// Get the location of each texture within its storage, so we can find the handles to apply the dependency to.
// This can consist of multiple disjoint regions, for example if this is a mip slice of an array texture.
List<(int BaseHandle, int RegionCount)> targetRange = new List<(int BaseHandle, int RegionCount)>();
List<(int BaseHandle, int RegionCount)> otherRange = new List<(int BaseHandle, int RegionCount)>();
List<(int BaseHandle, int RegionCount)> targetRange = new();
List<(int BaseHandle, int RegionCount)> otherRange = new();
EvaluateRelevantHandles(firstLayer, firstLevel, other.Info.GetSlices(), other.Info.Levels, (baseHandle, regionCount, split) => targetRange.Add((baseHandle, regionCount)));
otherGroup.EvaluateRelevantHandles(other, (baseHandle, regionCount, split) => otherRange.Add((baseHandle, regionCount)));

View File

@@ -663,7 +663,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <param name="overlapsCount">Total of overlaps</param>
private void CreateBufferAligned(ulong address, ulong size, BufferStage stage, bool sparseCompatible, Buffer[] overlaps, int overlapsCount)
{
Buffer newBuffer = new Buffer(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
Buffer newBuffer = new(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
lock (_buffers)
{

View File

@@ -431,7 +431,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
BufferMigration oldMigration = ranges._source;
BufferMigrationSpan span = new BufferMigrationSpan(ranges._parent, ranges._flushAction, oldMigration);
BufferMigrationSpan span = new(ranges._parent, ranges._flushAction, oldMigration);
ranges._parent.IncrementReferenceCount();
if (_source == null)

View File

@@ -73,7 +73,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
if (binding >= 0)
{
BufferRange range = new BufferRange(_handle, 0, data.Length);
BufferRange range = new(_handle, 0, data.Length);
_renderer.Pipeline.SetUniformBuffers(stackalloc[] { new BufferAssignment(0, range) });
}
};

View File

@@ -458,7 +458,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
int pages = (int)((endVaRounded - va) / PageSize);
List<MemoryRange> regions = new List<MemoryRange>();
List<MemoryRange> regions = new();
for (int page = 0; page < pages - 1; page++)
{

View File

@@ -19,7 +19,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <param name="renderer">Renderer that the support buffer will be used with</param>
public SupportBufferUpdater(IRenderer renderer) : base(renderer)
{
Vector4<float> defaultScale = new Vector4<float> { X = 1f, Y = 0f, Z = 0f, W = 0f };
Vector4<float> defaultScale = new() { X = 1f, Y = 0f, Z = 0f, W = 0f };
_data.RenderScale.AsSpan().Fill(defaultScale);
DirtyRenderScale(0, SupportBuffer.RenderScaleMaxCount);
}

View File

@@ -60,7 +60,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
{
Target target = descriptor.Type != SamplerType.None ? ShaderTexture.GetTarget(descriptor.Type) : default;
TextureBindingInfo result = new TextureBindingInfo(
TextureBindingInfo result = new(
target,
descriptor.Set,
descriptor.Binding,
@@ -88,7 +88,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
Target target = ShaderTexture.GetTarget(descriptor.Type);
FormatInfo formatInfo = ShaderTexture.GetFormatInfo(descriptor.Format);
TextureBindingInfo result = new TextureBindingInfo(
TextureBindingInfo result = new(
target,
formatInfo,
descriptor.Set,

View File

@@ -302,7 +302,7 @@ namespace Ryujinx.Graphics.Metal
return null;
}
I8ToI16CacheKey key = new I8ToI16CacheKey(_renderer);
I8ToI16CacheKey key = new(_renderer);
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out BufferHolder holder))
{
@@ -325,7 +325,7 @@ namespace Ryujinx.Graphics.Metal
return null;
}
TopologyConversionCacheKey key = new TopologyConversionCacheKey(_renderer, pattern, indexSize);
TopologyConversionCacheKey key = new(_renderer, pattern, indexSize);
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out BufferHolder holder))
{

View File

@@ -74,7 +74,7 @@ namespace Ryujinx.Graphics.Metal
return BufferHandle.Null;
}
BufferHolder holder = new BufferHolder(_renderer, _pipeline, buffer, size);
BufferHolder holder = new(_renderer, _pipeline, buffer, size);
BufferCount++;

View File

@@ -149,7 +149,7 @@ class CommandBufferEncoder
{
EndCurrentPass();
using MTLBlitPassDescriptor descriptor = new MTLBlitPassDescriptor();
using MTLBlitPassDescriptor descriptor = new();
MTLBlitCommandEncoder blitCommandEncoder = _commandBuffer.BlitCommandEncoder(descriptor);
CurrentEncoder = blitCommandEncoder;

View File

@@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Metal
ref StencilUid frontUid = ref descriptor.FrontFace;
using MTLStencilDescriptor frontFaceStencil = new MTLStencilDescriptor
using MTLStencilDescriptor frontFaceStencil = new()
{
StencilFailureOperation = frontUid.StencilFailureOperation,
DepthFailureOperation = frontUid.DepthFailureOperation,
@@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Metal
ref StencilUid backUid = ref descriptor.BackFace;
using MTLStencilDescriptor backFaceStencil = new MTLStencilDescriptor
using MTLStencilDescriptor backFaceStencil = new()
{
StencilFailureOperation = backUid.StencilFailureOperation,
DepthFailureOperation = backUid.DepthFailureOperation,
@@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.Metal
WriteMask = backUid.WriteMask
};
MTLDepthStencilDescriptor mtlDescriptor = new MTLDepthStencilDescriptor
MTLDepthStencilDescriptor mtlDescriptor = new()
{
DepthCompareFunction = descriptor.DepthCompareFunction,
DepthWriteEnabled = descriptor.DepthWriteEnabled

View File

@@ -165,7 +165,7 @@ namespace Ryujinx.Graphics.Metal
{
// Inherit render target related information without causing a render encoder split.
RenderTargetCopy oldState = new RenderTargetCopy
RenderTargetCopy oldState = new()
{
Scissors = other.Scissors,
RenderTargets = other.RenderTargets,

View File

@@ -125,7 +125,7 @@ namespace Ryujinx.Graphics.Metal
public readonly MTLRenderCommandEncoder CreateRenderCommandEncoder()
{
// Initialise Pass & State
using MTLRenderPassDescriptor renderPassDescriptor = new MTLRenderPassDescriptor();
using MTLRenderPassDescriptor renderPassDescriptor = new();
for (int i = 0; i < Constants.MaxColorAttachments; i++)
{
@@ -185,7 +185,7 @@ namespace Ryujinx.Graphics.Metal
public readonly MTLComputeCommandEncoder CreateComputeCommandEncoder()
{
using MTLComputePassDescriptor descriptor = new MTLComputePassDescriptor();
using MTLComputePassDescriptor descriptor = new();
MTLComputeCommandEncoder computeCommandEncoder = _pipeline.CommandBuffer.ComputeCommandEncoder(descriptor);
return computeCommandEncoder;

View File

@@ -239,7 +239,7 @@ namespace Ryujinx.Graphics.Metal
buffer.Holder.SetDataUnchecked<float>(buffer.Offset, region);
_pipeline.SetUniformBuffers([new BufferAssignment(0, buffer.Range)]);
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),
@@ -365,7 +365,7 @@ namespace Ryujinx.Graphics.Metal
Span<Viewport> viewports = stackalloc Viewport[16];
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),
@@ -527,7 +527,7 @@ namespace Ryujinx.Graphics.Metal
Span<Viewport> viewports = stackalloc Viewport[16];
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),

View File

@@ -253,7 +253,7 @@ namespace Ryujinx.Graphics.Metal
public ICounterEvent ReportCounter(CounterType type, EventHandler<ulong> resultHandler, float divisor, bool hostReserved)
{
// https://developer.apple.com/documentation/metal/gpu_counters_and_counter_sample_buffers/creating_a_counter_sample_buffer_to_store_a_gpu_s_counter_data_during_a_pass?language=objc
CounterEvent counterEvent = new CounterEvent();
CounterEvent counterEvent = new();
resultHandler?.Invoke(counterEvent, type == CounterType.SamplesPassed ? (ulong)1 : 0);
return counterEvent;
}

View File

@@ -149,8 +149,8 @@ namespace Ryujinx.Graphics.Metal
public void Present(CAMetalDrawable drawable, Texture src, Extents2D srcRegion, Extents2D dstRegion, bool isLinear)
{
// TODO: Clean this up
TextureCreateInfo textureInfo = new TextureCreateInfo((int)drawable.Texture.Width, (int)drawable.Texture.Height, (int)drawable.Texture.Depth, (int)drawable.Texture.MipmapLevelCount, (int)drawable.Texture.SampleCount, 0, 0, 0, Format.B8G8R8A8Unorm, 0, Target.Texture2D, SwizzleComponent.Red, SwizzleComponent.Green, SwizzleComponent.Blue, SwizzleComponent.Alpha);
Texture dst = new Texture(_device, _renderer, this, textureInfo, drawable.Texture, 0, 0);
TextureCreateInfo textureInfo = new((int)drawable.Texture.Width, (int)drawable.Texture.Height, (int)drawable.Texture.Depth, (int)drawable.Texture.MipmapLevelCount, (int)drawable.Texture.SampleCount, 0, 0, 0, Format.B8G8R8A8Unorm, 0, Target.Texture2D, SwizzleComponent.Red, SwizzleComponent.Green, SwizzleComponent.Blue, SwizzleComponent.Alpha);
Texture dst = new(_device, _renderer, this, textureInfo, drawable.Texture, 0, 0);
_renderer.HelperShader.BlitColor(Cbs, src, dst, srcRegion, dstRegion, isLinear, true);

View File

@@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Metal
{
ShaderSource shader = _shaders[i];
using MTLCompileOptions compileOptions = new MTLCompileOptions
using MTLCompileOptions compileOptions = new()
{
PreserveInvariance = true,
LanguageVersion = MTLLanguageVersion.Version31,

View File

@@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Metal
MTLSamplerBorderColor borderColor = GetConstrainedBorderColor(info.BorderColor, out _);
using MTLSamplerDescriptor descriptor = new MTLSamplerDescriptor
using MTLSamplerDescriptor descriptor = new()
{
BorderColor = borderColor,
MinFilter = minFilter,

View File

@@ -118,7 +118,7 @@ namespace Ryujinx.Graphics.Metal
private readonly MTLVertexDescriptor BuildVertexDescriptor()
{
MTLVertexDescriptor vertexDescriptor = new MTLVertexDescriptor();
MTLVertexDescriptor vertexDescriptor = new();
for (int i = 0; i < VertexAttributeDescriptionsCount; i++)
{
@@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.Metal
private MTLRenderPipelineDescriptor CreateRenderDescriptor(Program program)
{
MTLRenderPipelineDescriptor renderPipelineDescriptor = new MTLRenderPipelineDescriptor();
MTLRenderPipelineDescriptor renderPipelineDescriptor = new();
for (int i = 0; i < Constants.MaxColorAttachments; i++)
{
@@ -217,7 +217,7 @@ namespace Ryujinx.Graphics.Metal
using MTLRenderPipelineDescriptor descriptor = CreateRenderDescriptor(program);
NSError error = new NSError(IntPtr.Zero);
NSError error = new(IntPtr.Zero);
pipelineState = device.NewRenderPipelineState(descriptor, ref error);
if (error != IntPtr.Zero)
{
@@ -240,7 +240,7 @@ namespace Ryujinx.Graphics.Metal
throw new InvalidOperationException($"Local thread size for compute cannot be 0 in any dimension.");
}
MTLComputePipelineDescriptor descriptor = new MTLComputePipelineDescriptor
MTLComputePipelineDescriptor descriptor = new()
{
ComputeFunction = program.ComputeFunction,
MaxTotalThreadsPerThreadgroup = maxThreads,
@@ -259,7 +259,7 @@ namespace Ryujinx.Graphics.Metal
using MTLComputePipelineDescriptor descriptor = CreateComputeDescriptor(program);
NSError error = new NSError(IntPtr.Zero);
NSError error = new(IntPtr.Zero);
pipelineState = device.NewComputePipelineState(descriptor, MTLPipelineOption.None, 0, ref error);
if (error != IntPtr.Zero)
{

View File

@@ -18,7 +18,7 @@ namespace Ryujinx.Graphics.Metal
{
MTLPixelFormat pixelFormat = FormatTable.GetFormat(Info.Format);
MTLTextureDescriptor descriptor = new MTLTextureDescriptor
MTLTextureDescriptor descriptor = new()
{
PixelFormat = pixelFormat,
Usage = MTLTextureUsage.Unknown,

View File

@@ -33,8 +33,8 @@ namespace Ryujinx.Graphics.Metal
ulong bytesPerRow = (ulong)BitUtils.AlignUp(blockWidth * info.BytesPerPixel, 4);
ulong bytesPerImage = bytesPerRow * (ulong)blockHeight;
MTLOrigin origin = new MTLOrigin { x = (ulong)x, y = (ulong)y, z = is3D ? (ulong)dstLayer : 0 };
MTLSize region = new MTLSize { width = (ulong)width, height = (ulong)height, depth = 1 };
MTLOrigin origin = new() { x = (ulong)x, y = (ulong)y, z = is3D ? (ulong)dstLayer : 0 };
MTLSize region = new() { width = (ulong)width, height = (ulong)height, depth = 1 };
uint layer = is3D ? 0 : (uint)dstLayer;

View File

@@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.Metal
if (_requestedWidth != 0 && _requestedHeight != 0)
{
// TODO: This is actually a CGSize, but there is no overload for that, so fill the first two fields of rect with the size.
NSRect rect = new NSRect(_requestedWidth, _requestedHeight, 0, 0);
NSRect rect = new(_requestedWidth, _requestedHeight, 0, 0);
ObjectiveC.objc_msgSend(_metalLayer, "setDrawableSize:", rect);
@@ -62,7 +62,7 @@ namespace Ryujinx.Graphics.Metal
{
ResizeIfNeeded();
CAMetalDrawable drawable = new CAMetalDrawable(ObjectiveC.IntPtr_objc_msgSend(_metalLayer, "nextDrawable"));
CAMetalDrawable drawable = new(ObjectiveC.IntPtr_objc_msgSend(_metalLayer, "nextDrawable"));
_width = (int)drawable.Texture.Width;
_height = (int)drawable.Texture.Height;

View File

@@ -98,7 +98,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects
{
_intermediaryTexture?.Dispose();
TextureCreateInfo originalInfo = view.Info;
TextureCreateInfo info = new TextureCreateInfo(width,
TextureCreateInfo info = new(width,
height,
originalInfo.Depth,
originalInfo.Levels,

View File

@@ -117,7 +117,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
private void Initialize()
{
TextureCreateInfo areaInfo = new TextureCreateInfo(AreaWidth,
TextureCreateInfo areaInfo = new(AreaWidth,
AreaHeight,
1,
1,
@@ -133,7 +133,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
SwizzleComponent.Blue,
SwizzleComponent.Alpha);
TextureCreateInfo searchInfo = new TextureCreateInfo(SearchWidth,
TextureCreateInfo searchInfo = new(SearchWidth,
SearchHeight,
1,
1,
@@ -194,7 +194,7 @@ namespace Ryujinx.Graphics.OpenGL.Effects.Smaa
GL.ActiveTexture(TextureUnit.Texture2);
int previousTextureBinding2 = GL.GetInteger(GetPName.TextureBinding2D);
Framebuffer framebuffer = new Framebuffer();
Framebuffer framebuffer = new();
framebuffer.Bind();
framebuffer.AttachColor(0, edgeOutput);
GL.Clear(ClearBufferMask.ColorBufferBit);

View File

@@ -394,7 +394,7 @@ namespace Ryujinx.Graphics.OpenGL
{
_upscaledTexture?.Dispose();
TextureCreateInfo info = new TextureCreateInfo(
TextureCreateInfo info = new(
_width,
_height,
1,

View File

@@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
bool isArray = (texOp.Type & SamplerType.Array) != 0;
StringBuilder texCallBuilder = new StringBuilder();
StringBuilder texCallBuilder = new();
if (texOp.Inst == Instruction.ImageAtomic)
{

View File

@@ -157,7 +157,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
bool isArray = (texOp.Type & SamplerType.Array) != 0;
StringBuilder texCallBuilder = new StringBuilder();
StringBuilder texCallBuilder = new();
int srcIndex = 0;
@@ -194,7 +194,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
texCallBuilder.Append('(');
StringBuilder coordsBuilder = new StringBuilder();
StringBuilder coordsBuilder = new();
int coordsCount = texOp.Type.GetDimensions();
@@ -352,7 +352,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
bool isArray = (texOp.Type & SamplerType.Array) != 0;
bool isShadow = (texOp.Type & SamplerType.Shadow) != 0;
StringBuilder texCallBuilder = new StringBuilder();
StringBuilder texCallBuilder = new();
bool colorIsVector = isGather || !isShadow;
@@ -589,7 +589,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
{
AstTextureOperation texOp = (AstTextureOperation)operation;
StringBuilder texCallBuilder = new StringBuilder();
StringBuilder texCallBuilder = new();
int srcIndex = 0;

View File

@@ -176,7 +176,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
}
string funcPrefix = $"{funcKeyword} {returnType} {funcName ?? function.Name}(";
string indent = new string(' ', funcPrefix.Length);
string indent = new(' ', funcPrefix.Length);
return $"{funcPrefix}{string.Join($", \n{indent}", args)})";
}

View File

@@ -147,7 +147,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
public Instruction[] GetMainInterface()
{
List<Instruction> mainInterface = new List<Instruction>();
List<Instruction> mainInterface = new();
mainInterface.AddRange(Inputs.Values);
mainInterface.AddRange(Outputs.Values);

View File

@@ -1327,7 +1327,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
compIdx = Src(AggregateType.S32);
}
List<SpvInstruction> operandsList = new List<SpvInstruction>();
List<SpvInstruction> operandsList = new();
ImageOperandsMask operandsMask = ImageOperandsMask.MaskNone;
if (hasLodBias)
@@ -1754,7 +1754,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
storageClass = isOutput ? StorageClass.Output : StorageClass.Input;
IoDefinition ioDefinition = new IoDefinition(storageKind, ioVariable, location, component);
IoDefinition ioDefinition = new(storageKind, ioVariable, location, component);
Dictionary<IoDefinition, SpvInstruction> dict = isPerPatch
? (isOutput ? context.OutputsPerPatch : context.InputsPerPatch)
: (isOutput ? context.Outputs : context.Inputs);
@@ -1843,7 +1843,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
(_, AggregateType varType) = IoMap.GetSpirvBuiltIn(ioVariable);
varType &= AggregateType.ElementTypeMask;
IoDefinition ioDefinition = new IoDefinition(StorageKind.Input, ioVariable);
IoDefinition ioDefinition = new(StorageKind.Input, ioVariable);
return context.Load(context.GetType(varType), context.Inputs[ioDefinition]);
}

View File

@@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
{
AstBlockVisitor visitor = new(block);
Dictionary<AstBlock, (SpvInstruction, SpvInstruction)> loopTargets = new Dictionary<AstBlock, (SpvInstruction, SpvInstruction)>();
Dictionary<AstBlock, (SpvInstruction, SpvInstruction)> loopTargets = new();
context.LoopTargets = loopTargets;

View File

@@ -57,7 +57,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
private static IReadOnlyDictionary<int, AttributeEntry> CreateMap()
{
Dictionary<int, AttributeEntry> map = new Dictionary<int, AttributeEntry>();
Dictionary<int, AttributeEntry> map = new();
Add(map, 0x060, AggregateType.S32, IoVariable.PrimitiveId, StagesMask.TessellationGeometryFragment, StagesMask.Geometry);
Add(map, 0x064, AggregateType.S32, IoVariable.Layer, StagesMask.Fragment, StagesMask.VertexTessellationGeometry);
@@ -84,7 +84,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
private static IReadOnlyDictionary<int, AttributeEntry> CreatePerPatchMap()
{
Dictionary<int, AttributeEntry> map = new Dictionary<int, AttributeEntry>();
Dictionary<int, AttributeEntry> map = new();
Add(map, 0x000, AggregateType.Vector4 | AggregateType.FP32, IoVariable.TessellationLevelOuter, StagesMask.TessellationEvaluation, StagesMask.TessellationControl);
Add(map, 0x010, AggregateType.Vector2 | AggregateType.FP32, IoVariable.TessellationLevelInner, StagesMask.TessellationEvaluation, StagesMask.TessellationControl);

View File

@@ -103,7 +103,7 @@ namespace Ryujinx.Graphics.Shader.Translation
size = DefaultLocalMemorySize;
}
MemoryDefinition lmem = new MemoryDefinition("local_memory", AggregateType.Array | AggregateType.U32, BitUtils.DivRoundUp(size, sizeof(uint)));
MemoryDefinition lmem = new("local_memory", AggregateType.Array | AggregateType.U32, BitUtils.DivRoundUp(size, sizeof(uint)));
LocalMemoryId = Properties.AddLocalMemory(lmem);
}
@@ -122,7 +122,7 @@ namespace Ryujinx.Graphics.Shader.Translation
size = DefaultSharedMemorySize;
}
MemoryDefinition smem = new MemoryDefinition("shared_memory", AggregateType.Array | AggregateType.U32, BitUtils.DivRoundUp(size, sizeof(uint)));
MemoryDefinition smem = new("shared_memory", AggregateType.Array | AggregateType.U32, BitUtils.DivRoundUp(size, sizeof(uint)));
SharedMemoryId = Properties.AddSharedMemory(smem);
}
@@ -315,8 +315,8 @@ namespace Ryujinx.Graphics.Shader.Translation
// For array textures, we also want to use type as key,
// since we may have texture handles stores in the same buffer, but for textures with different types.
SamplerType keyType = arrayLength > 1 ? type : SamplerType.None;
TextureInfo info = new TextureInfo(cbufSlot, handle, arrayLength, separate, keyType, format);
TextureMeta meta = new TextureMeta()
TextureInfo info = new(cbufSlot, handle, arrayLength, separate, keyType, format);
TextureMeta meta = new()
{
AccurateType = accurateType,
Type = type,
@@ -383,7 +383,7 @@ namespace Ryujinx.Graphics.Shader.Translation
nameSuffix = cbufSlot < 0 ? $"{prefix}_tcb_{handle:X}" : $"{prefix}_cb{cbufSlot}_{handle:X}";
}
TextureDefinition definition = new TextureDefinition(
TextureDefinition definition = new(
setIndex,
binding,
arrayLength,

View File

@@ -192,7 +192,7 @@ namespace Ryujinx.Graphics.Shader.Translation
component = subIndex;
}
TransformFeedbackVariable transformFeedbackVariable = new TransformFeedbackVariable(ioVariable, location, component);
TransformFeedbackVariable transformFeedbackVariable = new(ioVariable, location, component);
_transformFeedbackDefinitions.TryAdd(transformFeedbackVariable, transformFeedbackOutputs[wordOffset]);
}
}
@@ -219,7 +219,7 @@ namespace Ryujinx.Graphics.Shader.Translation
return false;
}
TransformFeedbackVariable transformFeedbackVariable = new TransformFeedbackVariable(ioVariable, location, component);
TransformFeedbackVariable transformFeedbackVariable = new(ioVariable, location, component);
return _transformFeedbackDefinitions.TryGetValue(transformFeedbackVariable, out transformFeedbackOutput);
}

View File

@@ -342,7 +342,7 @@ namespace Ryujinx.Graphics.Shader.Translation
_ => 1
};
ShaderProgramInfo info = new ShaderProgramInfo(
ShaderProgramInfo info = new(
resourceManager.GetConstantBufferDescriptors(),
resourceManager.GetStorageBufferDescriptors(),
resourceManager.GetTextureDescriptors(),
@@ -358,7 +358,7 @@ namespace Ryujinx.Graphics.Shader.Translation
clipDistancesWritten,
originalDefinitions.OmapTargets);
HostCapabilities hostCapabilities = new HostCapabilities(
HostCapabilities hostCapabilities = new(
GpuAccessor.QueryHostReducedPrecision(),
GpuAccessor.QueryHostSupportsFragmentShaderInterlock(),
GpuAccessor.QueryHostSupportsFragmentShaderOrderingIntel(),
@@ -369,7 +369,7 @@ namespace Ryujinx.Graphics.Shader.Translation
GpuAccessor.QueryHostSupportsTextureShadowLod(),
GpuAccessor.QueryHostSupportsViewportMask());
CodeGenParameters parameters = new CodeGenParameters(attributeUsage, definitions, resourceManager.Properties, hostCapabilities, GpuAccessor, Options.TargetApi);
CodeGenParameters parameters = new(attributeUsage, definitions, resourceManager.Properties, hostCapabilities, GpuAccessor, Options.TargetApi);
return Options.TargetLanguage switch
{
@@ -388,7 +388,7 @@ namespace Ryujinx.Graphics.Shader.Translation
{
StructureType tfeDataStruct = new(new StructureField[]
{
new StructureField(AggregateType.Array | AggregateType.U32, "data", 0)
new(AggregateType.Array | AggregateType.U32, "data", 0)
});
for (int i = 0; i < ResourceReservations.TfeBuffersCount; i++)
@@ -407,7 +407,7 @@ namespace Ryujinx.Graphics.Shader.Translation
StructureType vertexOutputStruct = new(new StructureField[]
{
new StructureField(AggregateType.Array | AggregateType.FP32, "data", 0)
new(AggregateType.Array | AggregateType.FP32, "data", 0)
});
int vertexOutputSbBinding = resourceManager.Reservations.VertexOutputStorageBufferBinding;
@@ -444,7 +444,7 @@ namespace Ryujinx.Graphics.Shader.Translation
StructureType geometryIbOutputStruct = new(new StructureField[]
{
new StructureField(AggregateType.Array | AggregateType.U32, "data", 0)
new(AggregateType.Array | AggregateType.U32, "data", 0)
});
int geometryIbOutputSbBinding = resourceManager.Reservations.GeometryIndexOutputStorageBufferBinding;
@@ -494,8 +494,8 @@ namespace Ryujinx.Graphics.Shader.Translation
public (ShaderProgram, ShaderProgramInfo) GenerateVertexPassthroughForCompute()
{
AttributeUsage attributeUsage = new AttributeUsage(GpuAccessor);
ResourceManager resourceManager = new ResourceManager(ShaderStage.Vertex, GpuAccessor);
AttributeUsage attributeUsage = new(GpuAccessor);
ResourceManager resourceManager = new(ShaderStage.Vertex, GpuAccessor);
ResourceReservations reservations = GetResourceReservations();
@@ -509,14 +509,14 @@ namespace Ryujinx.Graphics.Shader.Translation
StructureType vertexInputStruct = new(new StructureField[]
{
new StructureField(AggregateType.Array | AggregateType.FP32, "data", 0)
new(AggregateType.Array | AggregateType.FP32, "data", 0)
});
int vertexDataSbBinding = reservations.VertexOutputStorageBufferBinding;
BufferDefinition vertexOutputBuffer = new(BufferLayout.Std430, 1, vertexDataSbBinding, "vb_input", vertexInputStruct);
resourceManager.AddVertexAsComputeStorageBuffer(vertexOutputBuffer);
EmitterContext context = new EmitterContext();
EmitterContext context = new();
Operand vertexIndex = Options.TargetApi == TargetApi.OpenGL
? context.Load(StorageKind.Input, IoVariable.VertexId)
@@ -563,11 +563,11 @@ namespace Ryujinx.Graphics.Shader.Translation
Operation[] operations = context.GetOperations();
ControlFlowGraph cfg = ControlFlowGraph.Create(operations);
Function function = new Function(cfg.Blocks, "main", false, 0, 0);
Function function = new(cfg.Blocks, "main", false, 0, 0);
TransformFeedbackOutput[] transformFeedbackOutputs = GetTransformFeedbackOutputs(GpuAccessor, out ulong transformFeedbackVecMap);
ShaderDefinitions definitions = new ShaderDefinitions(ShaderStage.Vertex, transformFeedbackVecMap, transformFeedbackOutputs)
ShaderDefinitions definitions = new(ShaderStage.Vertex, transformFeedbackVecMap, transformFeedbackOutputs)
{
LastInVertexPipeline = true
};
@@ -612,10 +612,10 @@ namespace Ryujinx.Graphics.Shader.Translation
break;
}
AttributeUsage attributeUsage = new AttributeUsage(GpuAccessor);
ResourceManager resourceManager = new ResourceManager(ShaderStage.Geometry, GpuAccessor);
AttributeUsage attributeUsage = new(GpuAccessor);
ResourceManager resourceManager = new(ShaderStage.Geometry, GpuAccessor);
EmitterContext context = new EmitterContext();
EmitterContext context = new();
for (int v = 0; v < maxOutputVertices; v++)
{
@@ -658,9 +658,9 @@ namespace Ryujinx.Graphics.Shader.Translation
Operation[] operations = context.GetOperations();
ControlFlowGraph cfg = ControlFlowGraph.Create(operations);
Function function = new Function(cfg.Blocks, "main", false, 0, 0);
Function function = new(cfg.Blocks, "main", false, 0, 0);
ShaderDefinitions definitions = new ShaderDefinitions(
ShaderDefinitions definitions = new(
ShaderStage.Geometry,
GpuAccessor.QueryGraphicsState(),
false,

View File

@@ -4,14 +4,14 @@ namespace Ryujinx.Graphics.Texture.Utils
{
public static readonly BC7ModeInfo[] BC7ModeInfos = new BC7ModeInfo[]
{
new BC7ModeInfo(3, 4, 6, 0, 0, 3, 0, 4, 0),
new BC7ModeInfo(2, 6, 2, 0, 0, 3, 0, 6, 0),
new BC7ModeInfo(3, 6, 0, 0, 0, 2, 0, 5, 0),
new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 7, 0),
new BC7ModeInfo(1, 0, 0, 2, 1, 2, 3, 5, 6),
new BC7ModeInfo(1, 0, 0, 2, 0, 2, 2, 7, 8),
new BC7ModeInfo(1, 0, 2, 0, 0, 4, 0, 7, 7),
new BC7ModeInfo(2, 6, 4, 0, 0, 2, 0, 5, 5),
new(3, 4, 6, 0, 0, 3, 0, 4, 0),
new(2, 6, 2, 0, 0, 3, 0, 6, 0),
new(3, 6, 0, 0, 0, 2, 0, 5, 0),
new(2, 6, 4, 0, 0, 2, 0, 7, 0),
new(1, 0, 0, 2, 1, 2, 3, 5, 6),
new(1, 0, 0, 2, 0, 2, 2, 7, 8),
new(1, 0, 2, 0, 0, 4, 0, 7, 7),
new(2, 6, 4, 0, 0, 2, 0, 5, 5),
};
public static readonly byte[][] Weights =

View File

@@ -145,7 +145,7 @@ namespace Ryujinx.Graphics.Vulkan
stages |= PipelineStageFlags.DrawIndirectBit;
}
MemoryBarrier barrier = new MemoryBarrier()
MemoryBarrier barrier = new()
{
SType = StructureType.MemoryBarrier,
SrcAccessMask = access,
@@ -175,7 +175,7 @@ namespace Ryujinx.Graphics.Vulkan
{
// Feedback loop barrier.
MemoryBarrier barrier = new MemoryBarrier()
MemoryBarrier barrier = new()
{
SType = StructureType.MemoryBarrier,
SrcAccessMask = AccessFlags.ShaderWriteBit,

View File

@@ -220,7 +220,7 @@ namespace Ryujinx.Graphics.Vulkan
public BitMapStruct<T> Union(BitMapStruct<T> other)
{
BitMapStruct<T> result = new BitMapStruct<T>();
BitMapStruct<T> result = new();
ref T masks = ref _masks;
ref T otherMasks = ref other._masks;

View File

@@ -113,7 +113,7 @@ namespace Ryujinx.Graphics.Vulkan
public unsafe Auto<DisposableBufferView> CreateView(VkFormat format, int offset, int size, Action invalidateView)
{
BufferViewCreateInfo bufferViewCreateInfo = new BufferViewCreateInfo
BufferViewCreateInfo bufferViewCreateInfo = new()
{
SType = StructureType.BufferViewCreateInfo,
Buffer = new VkBuffer(_bufferHandle),
@@ -205,7 +205,7 @@ namespace Ryujinx.Graphics.Vulkan
// Build data for the new mirror.
Span<byte> baseData = new Span<byte>((void*)(_map + offset), size);
Span<byte> baseData = new((void*)(_map + offset), size);
Span<byte> modData = _pendingData.AsSpan(offset, size);
StagingBufferReserved? newMirror = _gd.BufferManager.StagingBuffer.TryReserveData(cbs, size);
@@ -723,7 +723,7 @@ namespace Ryujinx.Graphics.Vulkan
dstOffset,
size);
BufferCopy region = new BufferCopy((ulong)srcOffset, (ulong)dstOffset, (ulong)size);
BufferCopy region = new((ulong)srcOffset, (ulong)dstOffset, (ulong)size);
gd.Api.CmdCopyBuffer(cbs.CommandBuffer, srcBuffer, dstBuffer, 1, &region);
@@ -804,7 +804,7 @@ namespace Ryujinx.Graphics.Vulkan
return null;
}
I8ToI16CacheKey key = new I8ToI16CacheKey(_gd);
I8ToI16CacheKey key = new(_gd);
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out BufferHolder holder))
{
@@ -828,7 +828,7 @@ namespace Ryujinx.Graphics.Vulkan
return null;
}
AlignedVertexBufferCacheKey key = new AlignedVertexBufferCacheKey(_gd, stride, alignment);
AlignedVertexBufferCacheKey key = new(_gd, stride, alignment);
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out BufferHolder holder))
{
@@ -854,7 +854,7 @@ namespace Ryujinx.Graphics.Vulkan
return null;
}
TopologyConversionCacheKey key = new TopologyConversionCacheKey(_gd, pattern, indexSize);
TopologyConversionCacheKey key = new(_gd, pattern, indexSize);
if (!_cachedConvertedBuffers.TryGetValue(offset, size, key, out BufferHolder holder))
{

View File

@@ -103,13 +103,13 @@ namespace Ryujinx.Graphics.Vulkan
usage |= BufferUsageFlags.IndirectBufferBit;
}
ExternalMemoryBufferCreateInfo externalMemoryBuffer = new ExternalMemoryBufferCreateInfo
ExternalMemoryBufferCreateInfo externalMemoryBuffer = new()
{
SType = StructureType.ExternalMemoryBufferCreateInfo,
HandleTypes = ExternalMemoryHandleTypeFlags.HostAllocationBitExt,
};
BufferCreateInfo bufferCreateInfo = new BufferCreateInfo
BufferCreateInfo bufferCreateInfo = new()
{
SType = StructureType.BufferCreateInfo,
Size = (ulong)size,
@@ -124,7 +124,7 @@ namespace Ryujinx.Graphics.Vulkan
gd.Api.BindBufferMemory(_device, buffer, allocation.GetUnsafe().Memory, allocation.GetUnsafe().Offset + offset);
BufferHolder holder = new BufferHolder(gd, _device, buffer, allocation, size, BufferAllocationType.HostMapped, BufferAllocationType.HostMapped, (int)offset);
BufferHolder holder = new(gd, _device, buffer, allocation, size, BufferAllocationType.HostMapped, BufferAllocationType.HostMapped, (int)offset);
BufferCount++;
@@ -149,7 +149,7 @@ namespace Ryujinx.Graphics.Vulkan
size += (ulong)range.Size;
}
BufferCreateInfo bufferCreateInfo = new BufferCreateInfo()
BufferCreateInfo bufferCreateInfo = new()
{
SType = StructureType.BufferCreateInfo,
Size = size,
@@ -207,14 +207,14 @@ namespace Ryujinx.Graphics.Vulkan
fixed (SparseMemoryBind* pMemoryBinds = memoryBinds)
{
SparseBufferMemoryBindInfo bufferBind = new SparseBufferMemoryBindInfo()
SparseBufferMemoryBindInfo bufferBind = new()
{
Buffer = buffer,
BindCount = (uint)memoryBinds.Length,
PBinds = pMemoryBinds
};
BindSparseInfo bindSparseInfo = new BindSparseInfo()
BindSparseInfo bindSparseInfo = new()
{
SType = StructureType.BindSparseInfo,
BufferBindCount = 1,
@@ -224,7 +224,7 @@ namespace Ryujinx.Graphics.Vulkan
gd.Api.QueueBindSparse(gd.Queue, 1, in bindSparseInfo, default).ThrowOnError();
}
BufferHolder holder = new BufferHolder(gd, _device, buffer, (int)size, storageAllocations);
BufferHolder holder = new(gd, _device, buffer, (int)size, storageAllocations);
BufferCount++;
@@ -295,7 +295,7 @@ namespace Ryujinx.Graphics.Vulkan
usage |= BufferUsageFlags.IndirectBufferBit;
}
BufferCreateInfo bufferCreateInfo = new BufferCreateInfo
BufferCreateInfo bufferCreateInfo = new()
{
SType = StructureType.BufferCreateInfo,
Size = (ulong)Environment.SystemPageSize,
@@ -331,7 +331,7 @@ namespace Ryujinx.Graphics.Vulkan
usage |= BufferUsageFlags.IndirectBufferBit;
}
BufferCreateInfo bufferCreateInfo = new BufferCreateInfo
BufferCreateInfo bufferCreateInfo = new()
{
SType = StructureType.BufferCreateInfo,
Size = (ulong)size,
@@ -402,7 +402,7 @@ namespace Ryujinx.Graphics.Vulkan
if (buffer.Handle != 0)
{
BufferHolder holder = new BufferHolder(gd, _device, buffer, allocation, size, baseType, resultType);
BufferHolder holder = new(gd, _device, buffer, allocation, size, baseType, resultType);
return holder;
}
@@ -493,7 +493,7 @@ namespace Ryujinx.Graphics.Vulkan
return (null, null);
}
TopologyConversionIndirectCacheKey indexBufferKey = new TopologyConversionIndirectCacheKey(
TopologyConversionIndirectCacheKey indexBufferKey = new(
gd,
pattern,
indexSize,
@@ -507,14 +507,14 @@ namespace Ryujinx.Graphics.Vulkan
indexBufferKey,
out BufferHolder convertedIndexBuffer);
IndirectDataCacheKey indirectBufferKey = new IndirectDataCacheKey(pattern);
IndirectDataCacheKey indirectBufferKey = new(pattern);
bool hasConvertedIndirectBuffer = indirectBufferHolder.TryGetCachedConvertedBuffer(
indirectBuffer.Offset,
indirectBuffer.Size,
indirectBufferKey,
out BufferHolder convertedIndirectBuffer);
DrawCountCacheKey drawCountBufferKey = new DrawCountCacheKey();
DrawCountCacheKey drawCountBufferKey = new();
bool hasCachedDrawCount = true;
if (hasDrawCount)
@@ -568,7 +568,7 @@ namespace Ryujinx.Graphics.Vulkan
// Any modification of the indirect buffer should invalidate the index buffers that are associated with it,
// since we used the indirect data to find the range of the index buffer that is used.
Dependency indexBufferDependency = new Dependency(
Dependency indexBufferDependency = new(
indexBufferHolder,
indexBuffer.Offset,
indexBuffer.Size,
@@ -590,7 +590,7 @@ namespace Ryujinx.Graphics.Vulkan
// If we have a draw count, any modification of the draw count should invalidate all indirect buffers
// where we used it to find the range of indirect data that is actually used.
Dependency indirectBufferDependency = new Dependency(
Dependency indirectBufferDependency = new(
indirectBufferHolder,
indirectBuffer.Offset,
indirectBuffer.Size,

View File

@@ -152,7 +152,7 @@ namespace Ryujinx.Graphics.Vulkan
{
_ranges = new List<Range>
{
new Range(offset, size)
new(offset, size)
};
}
}

View File

@@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Vulkan
public void Initialize(Vk api, Device device, CommandPool pool)
{
CommandBufferAllocateInfo allocateInfo = new CommandBufferAllocateInfo
CommandBufferAllocateInfo allocateInfo = new()
{
SType = StructureType.CommandBufferAllocateInfo,
CommandBufferCount = 1,
@@ -75,7 +75,7 @@ namespace Ryujinx.Graphics.Vulkan
_concurrentFenceWaitUnsupported = concurrentFenceWaitUnsupported;
_owner = Thread.CurrentThread;
CommandPoolCreateInfo commandPoolCreateInfo = new CommandPoolCreateInfo
CommandPoolCreateInfo commandPoolCreateInfo = new()
{
SType = StructureType.CommandPoolCreateInfo,
QueueFamilyIndex = queueFamilyIndex,
@@ -248,7 +248,7 @@ namespace Ryujinx.Graphics.Vulkan
_inUseCount++;
CommandBufferBeginInfo commandBufferBeginInfo = new CommandBufferBeginInfo
CommandBufferBeginInfo commandBufferBeginInfo = new()
{
SType = StructureType.CommandBufferBeginInfo,
};

View File

@@ -33,7 +33,7 @@ namespace Ryujinx.Graphics.Vulkan
{
if (bufferInfo.Buffer.Handle != 0UL)
{
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -56,7 +56,7 @@ namespace Ryujinx.Graphics.Vulkan
fixed (DescriptorBufferInfo* pBufferInfo = bufferInfo)
{
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -74,7 +74,7 @@ namespace Ryujinx.Graphics.Vulkan
{
if (imageInfo.ImageView.Handle != 0UL)
{
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -97,7 +97,7 @@ namespace Ryujinx.Graphics.Vulkan
fixed (DescriptorImageInfo* pImageInfo = imageInfo)
{
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -134,7 +134,7 @@ namespace Ryujinx.Graphics.Vulkan
count++;
}
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -156,7 +156,7 @@ namespace Ryujinx.Graphics.Vulkan
{
if (texelBufferView.Handle != 0UL)
{
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],
@@ -190,7 +190,7 @@ namespace Ryujinx.Graphics.Vulkan
count++;
}
WriteDescriptorSet writeDescriptorSet = new WriteDescriptorSet
WriteDescriptorSet writeDescriptorSet = new()
{
SType = StructureType.WriteDescriptorSet,
DstSet = _descriptorSets[setIndex],

View File

@@ -31,7 +31,7 @@ namespace Ryujinx.Graphics.Vulkan
fixed (DescriptorPoolSize* pPoolsSize = poolSizes)
{
DescriptorPoolCreateInfo descriptorPoolCreateInfo = new DescriptorPoolCreateInfo
DescriptorPoolCreateInfo descriptorPoolCreateInfo = new()
{
SType = StructureType.DescriptorPoolCreateInfo,
Flags = updateAfterBind ? DescriptorPoolCreateFlags.UpdateAfterBindBit : DescriptorPoolCreateFlags.None,
@@ -69,7 +69,7 @@ namespace Ryujinx.Graphics.Vulkan
{
fixed (DescriptorSetLayout* pLayouts = layouts)
{
DescriptorSetAllocateInfo descriptorSetAllocateInfo = new DescriptorSetAllocateInfo
DescriptorSetAllocateInfo descriptorSetAllocateInfo = new()
{
SType = StructureType.DescriptorSetAllocateInfo,
DescriptorPool = _pool,

View File

@@ -86,7 +86,7 @@ namespace Ryujinx.Graphics.Vulkan
Size = (int)structureOffset;
DescriptorUpdateTemplateCreateInfo info = new DescriptorUpdateTemplateCreateInfo()
DescriptorUpdateTemplateCreateInfo info = new()
{
SType = StructureType.DescriptorUpdateTemplateCreateInfo,
DescriptorUpdateEntryCount = (uint)segments.Length,
@@ -173,7 +173,7 @@ namespace Ryujinx.Graphics.Vulkan
Size = (int)structureOffset;
DescriptorUpdateTemplateCreateInfo info = new DescriptorUpdateTemplateCreateInfo()
DescriptorUpdateTemplateCreateInfo info = new()
{
SType = StructureType.DescriptorUpdateTemplateCreateInfo,
DescriptorUpdateEntryCount = (uint)entry,

View File

@@ -157,7 +157,7 @@ namespace Ryujinx.Graphics.Vulkan
_uniformSetPd = new int[Constants.MaxUniformBufferBindings];
DescriptorImageInfo initialImageInfo = new DescriptorImageInfo
DescriptorImageInfo initialImageInfo = new()
{
ImageLayout = ImageLayout.General,
};
@@ -441,7 +441,7 @@ namespace Ryujinx.Graphics.Vulkan
Range = (ulong)buffer.Size,
};
BufferRef newRef = new BufferRef(vkBuffer, ref buffer);
BufferRef newRef = new(vkBuffer, ref buffer);
ref DescriptorBufferInfo currentInfo = ref _storageBuffers[index];

View File

@@ -98,7 +98,7 @@ namespace Ryujinx.Graphics.Vulkan.Effects
{
TextureCreateInfo originalInfo = view.Info;
TextureCreateInfo info = new TextureCreateInfo(
TextureCreateInfo info = new(
width,
height,
originalInfo.Depth,

View File

@@ -109,7 +109,7 @@ namespace Ryujinx.Graphics.Vulkan.Effects
QualityUltra = Quality == 3 ? 1 : 0,
};
SpecDescription specInfo = new SpecDescription(
SpecDescription specInfo = new(
(0, SpecConstType.Int32),
(1, SpecConstType.Int32),
(2, SpecConstType.Int32),
@@ -143,7 +143,7 @@ namespace Ryujinx.Graphics.Vulkan.Effects
private void Initialize()
{
TextureCreateInfo areaInfo = new TextureCreateInfo(AreaWidth,
TextureCreateInfo areaInfo = new(AreaWidth,
AreaHeight,
1,
1,
@@ -159,7 +159,7 @@ namespace Ryujinx.Graphics.Vulkan.Effects
SwizzleComponent.Blue,
SwizzleComponent.Alpha);
TextureCreateInfo searchInfo = new TextureCreateInfo(SearchWidth,
TextureCreateInfo searchInfo = new(SearchWidth,
SearchHeight,
1,
1,

View File

@@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.Vulkan
_device = device;
_concurrentWaitUnsupported = concurrentWaitUnsupported;
FenceCreateInfo fenceCreateInfo = new FenceCreateInfo
FenceCreateInfo fenceCreateInfo = new()
{
SType = StructureType.FenceCreateInfo,
};

View File

@@ -240,7 +240,7 @@ namespace Ryujinx.Graphics.Vulkan
attachments[i] = _attachments[i].Get(cbs).Value;
}
FramebufferCreateInfo framebufferCreateInfo = new FramebufferCreateInfo
FramebufferCreateInfo framebufferCreateInfo = new()
{
SType = StructureType.FramebufferCreateInfo,
RenderPass = renderPass.Get(cbs).Value,

View File

@@ -65,7 +65,7 @@ namespace Ryujinx.Graphics.Vulkan
public void Add(ref TKey key, TValue value)
{
Entry entry = new Entry
Entry entry = new()
{
Hash = key.GetHashCode(),
Key = key,

View File

@@ -259,13 +259,13 @@ namespace Ryujinx.Graphics.Vulkan
for (int l = 0; l < levels; l++)
{
Extents2D mipSrcRegion = new Extents2D(
Extents2D mipSrcRegion = new(
srcRegion.X1 >> l,
srcRegion.Y1 >> l,
srcRegion.X2 >> l,
srcRegion.Y2 >> l);
Extents2D mipDstRegion = new Extents2D(
Extents2D mipDstRegion = new(
dstRegion.X1 >> l,
dstRegion.Y1 >> l,
dstRegion.X2 >> l,
@@ -335,7 +335,7 @@ namespace Ryujinx.Graphics.Vulkan
int dstWidth = Math.Max(1, dst.Width >> mipDstLevel);
int dstHeight = Math.Max(1, dst.Height >> mipDstLevel);
Extents2D extents = new Extents2D(
Extents2D extents = new(
0,
0,
Math.Min(srcWidth, dstWidth),
@@ -411,7 +411,7 @@ namespace Ryujinx.Graphics.Vulkan
Span<Viewport> viewports = stackalloc Viewport[1];
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),
@@ -507,7 +507,7 @@ namespace Ryujinx.Graphics.Vulkan
Span<Viewport> viewports = stackalloc Viewport[1];
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),
@@ -780,7 +780,7 @@ namespace Ryujinx.Graphics.Vulkan
Span<Viewport> viewports = stackalloc Viewport[1];
Rectangle<float> rect = new Rectangle<float>(
Rectangle<float> rect = new(
MathF.Min(dstRegion.X1, dstRegion.X2),
MathF.Min(dstRegion.Y1, dstRegion.Y2),
MathF.Abs(dstRegion.X2 - dstRegion.X1),
@@ -915,7 +915,7 @@ namespace Ryujinx.Graphics.Vulkan
gd.Api.CmdFillBuffer(cbs.CommandBuffer, dstBuffer, 0, Vk.WholeSize, 0);
List<BufferCopy> bufferCopy = new List<BufferCopy>();
List<BufferCopy> bufferCopy = new();
int outputOffset = 0;
// Try to merge copies of adjacent indices to reduce copy count.
@@ -1119,7 +1119,7 @@ namespace Ryujinx.Graphics.Vulkan
Span<Viewport> viewports = stackalloc Viewport[1];
Rectangle<float> rect = new Rectangle<float>(0, 0, dst.Width, dst.Height);
Rectangle<float> rect = new(0, 0, dst.Width, dst.Height);
viewports[0] = new Viewport(
rect,
@@ -1240,7 +1240,7 @@ namespace Ryujinx.Graphics.Vulkan
Span<Viewport> viewports = stackalloc Viewport[1];
Rectangle<float> rect = new Rectangle<float>(0, 0, dst.Width, dst.Height);
Rectangle<float> rect = new(0, 0, dst.Width, dst.Height);
viewports[0] = new Viewport(
rect,
@@ -1429,7 +1429,7 @@ namespace Ryujinx.Graphics.Vulkan
_ => Target.Texture2D,
};
TextureCreateInfo info = new TextureCreateInfo(
TextureCreateInfo info = new(
Math.Max(1, from.Info.Width >> level),
Math.Max(1, from.Info.Height >> level),
1,

Some files were not shown because too many files have changed in this diff Show More