mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 00:53:35 +00:00
SPIR-V: Fix ImageQuerySizeLod
This commit is contained in:
parent
a2e4b4b6d8
commit
97b179696b
4 changed files with 12 additions and 9 deletions
|
@ -1539,9 +1539,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
|
|
||||||
var meta = new TextureMeta(texOp.CbufSlot, texOp.Handle, texOp.Format, texOp.Type);
|
var meta = new TextureMeta(texOp.CbufSlot, texOp.Handle, texOp.Format, texOp.Type);
|
||||||
|
|
||||||
(_, var sampledImageType, var sampledImageVariable) = context.Samplers[meta];
|
(var imageType, var sampledImageType, var sampledImageVariable) = context.Samplers[meta];
|
||||||
|
|
||||||
var image = context.Load(sampledImageType, sampledImageVariable);
|
var image = context.Load(sampledImageType, sampledImageVariable);
|
||||||
|
image = context.Image(imageType, image);
|
||||||
|
|
||||||
if (texOp.Index == 3)
|
if (texOp.Index == 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
|
|
||||||
context.AddCapability(Capability.GroupNonUniformBallot);
|
context.AddCapability(Capability.GroupNonUniformBallot);
|
||||||
context.AddCapability(Capability.ImageBuffer);
|
context.AddCapability(Capability.ImageBuffer);
|
||||||
|
context.AddCapability(Capability.ImageQuery);
|
||||||
context.AddCapability(Capability.SampledBuffer);
|
context.AddCapability(Capability.SampledBuffer);
|
||||||
context.AddCapability(Capability.SubgroupBallotKHR);
|
context.AddCapability(Capability.SubgroupBallotKHR);
|
||||||
context.AddCapability(Capability.SubgroupVoteKHR);
|
context.AddCapability(Capability.SubgroupVoteKHR);
|
||||||
|
|
|
@ -234,7 +234,7 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
}
|
}
|
||||||
else if (Config.Stage == ShaderStage.Fragment)
|
else if (Config.Stage == ShaderStage.Fragment)
|
||||||
{
|
{
|
||||||
bool supportsBgra = Config.GpuAccessor.QueryHostSupportsBgraFormat();
|
bool supportsBgra = true; // Config.GpuAccessor.QueryHostSupportsBgraFormat();
|
||||||
|
|
||||||
if (Config.OmapDepth)
|
if (Config.OmapDepth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
// Copyright (c) 2014-2020 The Khronos Group Inc.
|
// Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and/or associated documentation files (the "Materials"),
|
// of this software and/or associated documentation files (the "Materials"),
|
||||||
// to deal in the Materials without restriction, including without limitation
|
// to deal in the Materials without restriction, including without limitation
|
||||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
// and/or sell copies of the Materials, and to permit persons to whom the
|
// and/or sell copies of the Materials, and to permit persons to whom the
|
||||||
// Materials are furnished to do so, subject to the following conditions:
|
// Materials are furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be included in
|
// The above copyright notice and this permission notice shall be included in
|
||||||
// all copies or substantial portions of the Materials.
|
// all copies or substantial portions of the Materials.
|
||||||
//
|
//
|
||||||
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||||
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||||
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||||
//
|
//
|
||||||
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
// Enumeration tokens for SPIR-V, in various styles:
|
// Enumeration tokens for SPIR-V, in various styles:
|
||||||
// C, C++, C++11, JSON, Lua, Python, C#, D
|
// C, C++, C++11, JSON, Lua, Python, C#, D
|
||||||
//
|
//
|
||||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||||
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||||
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||||
//
|
//
|
||||||
// Some tokens act like mask values, which can be OR'd together,
|
// Some tokens act like mask values, which can be OR'd together,
|
||||||
// while others are mutually exclusive. The mask-like ones have
|
// while others are mutually exclusive. The mask-like ones have
|
||||||
// "Mask" in their name, and a parallel enum that has the shift
|
// "Mask" in their name, and a parallel enum that has the shift
|
||||||
|
@ -362,6 +362,7 @@ namespace Spv
|
||||||
VolatileTexelKHR = 0x00000800,
|
VolatileTexelKHR = 0x00000800,
|
||||||
SignExtend = 0x00001000,
|
SignExtend = 0x00001000,
|
||||||
ZeroExtend = 0x00002000,
|
ZeroExtend = 0x00002000,
|
||||||
|
Offsets = 0x00010000,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FPFastMathModeShift
|
public enum FPFastMathModeShift
|
||||||
|
|
Loading…
Reference in a new issue