Add seamless cubemap flag in sampler parameters. (#1658)
* Add seamless cubemap flag in sampler parameters. * Check for the extension
This commit is contained in:
parent
e1da7df207
commit
4c6feb652f
5 changed files with 44 additions and 21 deletions
|
@ -23,6 +23,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
MinFilter minFilter = descriptor.UnpackMinFilter();
|
||||
MagFilter magFilter = descriptor.UnpackMagFilter();
|
||||
|
||||
bool seamlessCubemap = descriptor.UnpackSeamlessCubemap();
|
||||
|
||||
AddressMode addressU = descriptor.UnpackAddressU();
|
||||
AddressMode addressV = descriptor.UnpackAddressV();
|
||||
AddressMode addressP = descriptor.UnpackAddressP();
|
||||
|
@ -49,6 +51,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
HostSampler = context.Renderer.CreateSampler(new SamplerCreateInfo(
|
||||
minFilter,
|
||||
magFilter,
|
||||
seamlessCubemap,
|
||||
addressU,
|
||||
addressV,
|
||||
addressP,
|
||||
|
|
|
@ -184,6 +184,15 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
return MinFilter.Nearest;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unpacks the seamless cubemap flag.
|
||||
/// </summary>
|
||||
/// <returns>The seamless cubemap flag</returns>
|
||||
public bool UnpackSeamlessCubemap()
|
||||
{
|
||||
return (Word1 & (1 << 9)) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unpacks the reduction filter, used with texture minification linear filtering.
|
||||
/// This describes how the final value will be computed from neighbouring pixels.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue