fix bugs in retroshader sampler0 discovery
This commit is contained in:
parent
32a1101713
commit
01f1be126e
|
@ -318,7 +318,7 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
|
|||
if (type == ActiveUniformType.Sampler2D)
|
||||
{
|
||||
ui.IsSampler = true;
|
||||
ui.Index = loc;
|
||||
ui.SamplerIndex = samplers.Count;
|
||||
ui.Opaque = loc | (samplers.Count << 24);
|
||||
samplers.Add(loc);
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.SlimDX
|
|||
if (descr.Type == ParameterType.Sampler2D)
|
||||
{
|
||||
ui.IsSampler = true;
|
||||
ui.Index = descr.RegisterIndex;
|
||||
ui.SamplerIndex = descr.RegisterIndex;
|
||||
uw.SamplerIndex = descr.RegisterIndex;
|
||||
}
|
||||
uniforms.Add(ui);
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace BizHawk.Bizware.BizwareGL
|
|||
//sampler wasn't named correctly. this can happen on some retroarch shaders
|
||||
foreach (var u in Pipeline.GetUniforms())
|
||||
{
|
||||
if (u.Sole.IsSampler && u.Sole.Index == 0)
|
||||
if (u.Sole.IsSampler && u.Sole.SamplerIndex == 0)
|
||||
{
|
||||
sampler0 = u;
|
||||
break;
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace BizHawk.Bizware.BizwareGL
|
|||
{
|
||||
public object Opaque;
|
||||
public string Name;
|
||||
public int Index;
|
||||
public int SamplerIndex;
|
||||
public bool IsSampler;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue