fix texture bind info missed in vertex shader after compiled (#2270)
This commit is contained in:
parent
d03f7c6327
commit
c0bce01cc9
@ -513,7 +513,7 @@ namespace bgfx { namespace hlsl
|
||||
hr = reflect->GetResourceBindingDesc(ii, &bindDesc);
|
||||
if (SUCCEEDED(hr) )
|
||||
{
|
||||
if (D3D_SIT_SAMPLER == bindDesc.Type)
|
||||
if (D3D_SIT_SAMPLER == bindDesc.Type || D3D_SIT_TEXTURE == bindDesc.Type)
|
||||
{
|
||||
BX_TRACE("\t%s, %d, %d, %d"
|
||||
, bindDesc.Name
|
||||
@ -523,7 +523,10 @@ namespace bgfx { namespace hlsl
|
||||
);
|
||||
|
||||
bx::StringView end = bx::strFind(bindDesc.Name, "Sampler");
|
||||
if (!end.isEmpty() )
|
||||
if (end.isEmpty())
|
||||
end = bx::strFind(bindDesc.Name, "Texture");
|
||||
|
||||
if (!end.isEmpty())
|
||||
{
|
||||
Uniform un;
|
||||
un.name.assign(bindDesc.Name, (end.getPtr() - bindDesc.Name) );
|
||||
@ -534,6 +537,10 @@ namespace bgfx { namespace hlsl
|
||||
_uniforms.push_back(un);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BX_TRACE("\t%s, unknown bind data", bindDesc.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user