Extract texture Target from Info for quick access (#1774)

This commit is contained in:
riperiperi 2020-12-03 19:34:27 +00:00 committed by GitHub
parent b479a43939
commit 24d316cc92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View file

@ -298,7 +298,7 @@ namespace Ryujinx.Graphics.Gpu.Image
_context.Renderer.Pipeline.SetTexture(bindingInfo.Binding, hostTexture);
}
if (hostTexture != null && texture.Info.Target == Target.TextureBuffer)
if (hostTexture != null && texture.Target == Target.TextureBuffer)
{
// Ensure that the buffer texture is using the correct buffer as storage.
// Buffers are frequently re-created to accomodate larger data, so we need to re-bind
@ -349,7 +349,7 @@ namespace Ryujinx.Graphics.Gpu.Image
ITexture hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
if (hostTexture != null && texture.Info.Target == Target.TextureBuffer)
if (hostTexture != null && texture.Target == Target.TextureBuffer)
{
// Ensure that the buffer texture is using the correct buffer as storage.
// Buffers are frequently re-created to accomodate larger data, so we need to re-bind