Fix intel view copy workaround. (#2216)
The texture target must be taken from the storage rather than the view, when using the storage handle for the copy.
This commit is contained in:
parent
dc8c781d7a
commit
38be18ef2a
4 changed files with 9 additions and 9 deletions
|
@ -4,8 +4,8 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
{
|
{
|
||||||
interface ITextureInfo
|
interface ITextureInfo
|
||||||
{
|
{
|
||||||
|
ITextureInfo Storage { get; }
|
||||||
int Handle { get; }
|
int Handle { get; }
|
||||||
int StorageHandle { get; }
|
|
||||||
int FirstLayer => 0;
|
int FirstLayer => 0;
|
||||||
int FirstLevel => 0;
|
int FirstLevel => 0;
|
||||||
|
|
||||||
|
|
|
@ -208,14 +208,14 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
if (HwCapabilities.Vendor == HwCapabilities.GpuVendor.Intel)
|
if (HwCapabilities.Vendor == HwCapabilities.GpuVendor.Intel)
|
||||||
{
|
{
|
||||||
GL.CopyImageSubData(
|
GL.CopyImageSubData(
|
||||||
src.StorageHandle,
|
src.Storage.Handle,
|
||||||
srcInfo.Target.ConvertToImageTarget(),
|
src.Storage.Info.Target.ConvertToImageTarget(),
|
||||||
src.FirstLevel + srcLevel + level,
|
src.FirstLevel + srcLevel + level,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
src.FirstLayer + srcLayer,
|
src.FirstLayer + srcLayer,
|
||||||
dst.StorageHandle,
|
dst.Storage.Handle,
|
||||||
dstInfo.Target.ConvertToImageTarget(),
|
dst.Storage.Info.Target.ConvertToImageTarget(),
|
||||||
dst.FirstLevel + dstLevel + level,
|
dst.FirstLevel + dstLevel + level,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -6,8 +6,8 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
{
|
{
|
||||||
class TextureStorage : ITextureInfo
|
class TextureStorage : ITextureInfo
|
||||||
{
|
{
|
||||||
|
public ITextureInfo Storage => this;
|
||||||
public int Handle { get; private set; }
|
public int Handle { get; private set; }
|
||||||
public int StorageHandle => Handle;
|
|
||||||
public float ScaleFactor { get; private set; }
|
public float ScaleFactor { get; private set; }
|
||||||
|
|
||||||
public TextureCreateInfo Info { get; }
|
public TextureCreateInfo Info { get; }
|
||||||
|
|
|
@ -10,10 +10,10 @@ namespace Ryujinx.Graphics.OpenGL.Image
|
||||||
|
|
||||||
private readonly TextureStorage _parent;
|
private readonly TextureStorage _parent;
|
||||||
|
|
||||||
public int StorageHandle => _parent.Handle;
|
|
||||||
|
|
||||||
private TextureView _incompatibleFormatView;
|
private TextureView _incompatibleFormatView;
|
||||||
|
|
||||||
|
public ITextureInfo Storage => _parent;
|
||||||
|
|
||||||
public int FirstLayer { get; private set; }
|
public int FirstLayer { get; private set; }
|
||||||
public int FirstLevel { get; private set; }
|
public int FirstLevel { get; private set; }
|
||||||
|
|
||||||
|
|
Reference in a new issue