d3d12: Fix for case where fragment shaders samples textures starting from non first unit.

This commit is contained in:
Vincent Lejeune 2015-11-27 23:23:00 +01:00
parent ed3ac91263
commit 174fb97172

View file

@ -157,7 +157,8 @@ struct D3D12Traits
{ {
if (PT.type == "sampler2D") if (PT.type == "sampler2D")
{ {
fragmentProgramData.m_textureCount++; size_t texture_unit = atoi(PI.name.c_str() + 3);
fragmentProgramData.m_textureCount = std::max(texture_unit + 1, fragmentProgramData.m_textureCount);
continue; continue;
} }
size_t offset = atoi(PI.name.c_str() + 2); size_t offset = atoi(PI.name.c_str() + 2);