mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02:00
misc: chore: Fix object creation in SPIRV generator
This commit is contained in:
parent
742083ae3d
commit
56d373a011
1 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ namespace Spv.Generator
|
||||||
|
|
||||||
public Instruction AddExtInstImport(string import)
|
public Instruction AddExtInstImport(string import)
|
||||||
{
|
{
|
||||||
DeterministicStringKey key = new DeterministicStringKey(import);
|
DeterministicStringKey key = new(import);
|
||||||
|
|
||||||
if (_extInstImports.TryGetValue(key, out Instruction extInstImport))
|
if (_extInstImports.TryGetValue(key, out Instruction extInstImport))
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ namespace Spv.Generator
|
||||||
|
|
||||||
private void AddTypeDeclaration(Instruction instruction, bool forceIdAllocation)
|
private void AddTypeDeclaration(Instruction instruction, bool forceIdAllocation)
|
||||||
{
|
{
|
||||||
TypeDeclarationKey key = new TypeDeclarationKey(instruction);
|
TypeDeclarationKey key = new(instruction);
|
||||||
|
|
||||||
if (!forceIdAllocation)
|
if (!forceIdAllocation)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ namespace Spv.Generator
|
||||||
constant.Opcode == Op.OpConstantNull ||
|
constant.Opcode == Op.OpConstantNull ||
|
||||||
constant.Opcode == Op.OpConstantComposite);
|
constant.Opcode == Op.OpConstantComposite);
|
||||||
|
|
||||||
ConstantKey key = new ConstantKey(constant);
|
ConstantKey key = new(constant);
|
||||||
|
|
||||||
if (_constants.TryGetValue(key, out Instruction global))
|
if (_constants.TryGetValue(key, out Instruction global))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue