Fix TXQ for 3D textures. (#2613)
* Fix TXQ for 3D textures. Assumes the texture is 3D if the component mask contains Z. This fixes a bug in UE4 games where parts of the map had garbage pointers to lighting voxels, as the lookup 3D texture was not being initialized. Most notable game is THPS1+2. May need another PR to keep image store data alive and properly flush it in order using the AutoDeleteCache. * Get sampler type for TextureSize from bound textures.
This commit is contained in:
parent
142cededd4
commit
f0b00c1ae9
8 changed files with 60 additions and 18 deletions
|
@ -119,14 +119,14 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queries texture target information.
|
||||
/// Queries sampler type information.
|
||||
/// </summary>
|
||||
/// <param name="handle">Texture handle</param>
|
||||
/// <param name="cbufSlot">Constant buffer slot for the texture handle</param>
|
||||
/// <returns>True if the texture is a buffer texture, false otherwise</returns>
|
||||
public bool QueryIsTextureBuffer(int handle, int cbufSlot = -1)
|
||||
/// <returns>The sampler type value for the given handle</returns>
|
||||
public SamplerType QuerySamplerType(int handle, int cbufSlot = -1)
|
||||
{
|
||||
return GetTextureDescriptor(handle, cbufSlot).UnpackTextureTarget() == TextureTarget.TextureBuffer;
|
||||
return GetTextureDescriptor(handle, cbufSlot).UnpackTextureTarget().ConvertSamplerType();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue