Allow shader language and target API to be specified on the shader translator (#2402)

This commit is contained in:
gdkchan 2021-07-06 16:20:06 -03:00 committed by GitHub
parent b0ac1ade7f
commit d125fce3e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 87 additions and 27 deletions

View file

@ -29,7 +29,7 @@ namespace Ryujinx.Graphics.Shader.Translation
public IGpuAccessor GpuAccessor { get; }
public TranslationFlags Flags { get; }
public TranslationOptions Options { get; }
public int Size { get; private set; }
@ -94,18 +94,18 @@ namespace Ryujinx.Graphics.Shader.Translation
public int FirstConstantBufferBinding { get; private set; }
public int FirstStorageBufferBinding { get; private set; }
public ShaderConfig(IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts)
public ShaderConfig(IGpuAccessor gpuAccessor, TranslationOptions options, TranslationCounts counts)
{
Stage = ShaderStage.Compute;
GpuAccessor = gpuAccessor;
Flags = flags;
Options = options;
_counts = counts;
TextureHandlesForCache = new HashSet<int>();
_usedTextures = new Dictionary<TextureInfo, TextureMeta>();
_usedImages = new Dictionary<TextureInfo, TextureMeta>();
}
public ShaderConfig(ShaderHeader header, IGpuAccessor gpuAccessor, TranslationFlags flags, TranslationCounts counts) : this(gpuAccessor, flags, counts)
public ShaderConfig(ShaderHeader header, IGpuAccessor gpuAccessor, TranslationOptions options, TranslationCounts counts) : this(gpuAccessor, options, counts)
{
Stage = header.Stage;
GpPassthrough = header.Stage == ShaderStage.Geometry && header.GpPassthrough;