mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-24 16:30:12 +01:00
Implement textureQueryLevels (#1007)
This commit is contained in:
parent
31b94f4641
commit
49d7b1c7d8
@ -15,11 +15,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||
|
||||
public static void Declare(CodeGenContext context, StructuredProgramInfo info)
|
||||
{
|
||||
context.AppendLine("#version 420 core");
|
||||
context.AppendLine("#version 430 core");
|
||||
context.AppendLine("#extension GL_ARB_gpu_shader_int64 : enable");
|
||||
context.AppendLine("#extension GL_ARB_shader_ballot : enable");
|
||||
context.AppendLine("#extension GL_ARB_shader_group_vote : enable");
|
||||
context.AppendLine("#extension GL_ARB_shader_storage_buffer_object : enable");
|
||||
|
||||
if (context.Config.Stage == ShaderStage.Compute)
|
||||
{
|
||||
|
@ -494,8 +494,15 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
||||
|
||||
string lodExpr = GetSoureExpr(context, lod, GetSrcVarType(operation.Inst, lodSrcIndex));
|
||||
|
||||
if (texOp.Index == 3)
|
||||
{
|
||||
return $"textureQueryLevels({samplerName})";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"textureSize({samplerName}, {lodExpr}){GetMask(texOp.Index)}";
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetStorageBufferAccessor(string slotExpr, string offsetExpr, ShaderStage stage)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user