mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-13 19:10:19 +00:00
Fix shader specialization fast texture lookup
This commit is contained in:
parent
5bf992e083
commit
bf826ed9d1
1 changed files with 4 additions and 2 deletions
|
@ -220,16 +220,18 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
var texBindings = new Box<TextureSpecializationState>[textures.Count];
|
var texBindings = new Box<TextureSpecializationState>[textures.Count];
|
||||||
var imageBindings = new Box<TextureSpecializationState>[images.Count];
|
var imageBindings = new Box<TextureSpecializationState>[images.Count];
|
||||||
|
|
||||||
|
int stageIndex = Math.Max(i - 1, 0); // Don't count VertexA for looking up spec state. No-Op for compute.
|
||||||
|
|
||||||
for (int j = 0; j < textures.Count; j++)
|
for (int j = 0; j < textures.Count; j++)
|
||||||
{
|
{
|
||||||
var texture = textures[j];
|
var texture = textures[j];
|
||||||
texBindings[j] = GetTextureSpecState(i, texture.HandleIndex, texture.CbufSlot);
|
texBindings[j] = GetTextureSpecState(stageIndex, texture.HandleIndex, texture.CbufSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < images.Count; j++)
|
for (int j = 0; j < images.Count; j++)
|
||||||
{
|
{
|
||||||
var image = images[j];
|
var image = images[j];
|
||||||
imageBindings[j] = GetTextureSpecState(i, image.HandleIndex, image.CbufSlot);
|
imageBindings[j] = GetTextureSpecState(stageIndex, image.HandleIndex, image.CbufSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
_textureByBinding[i] = texBindings;
|
_textureByBinding[i] = texBindings;
|
||||||
|
|
Loading…
Reference in a new issue