In opengl it's possible to bind several textures to the same texture unit as long as they're a different target. Until now we were tracking that state. In practice it's not very useful to bind several textures to the same unit (it is a little bit when updating texture data, but not when rendering). With the coming change to a descriptor set API, it is better to have a 1-to-1 mapping between bound textures and texture units.
So with this change, only a single texture can be bound to a texture unit. If another texture in bound to the same unit with a different target, we first unbind the texture from the current target.
There is less state to track, and it allows us to "unbind a texture unit" (whereas before we'd have to iterate through all the possible targets for that unit and unbind all of them).
In opengl it's possible to bind several textures to the same texture unit as long as they're a different target. Until now we were tracking that state. In practice it's not very useful to bind several textures to the same unit (it is a little bit when updating texture data, but not when rendering). With the coming change to a descriptor set API, it is better to have a 1-to-1 mapping between bound textures and texture units.
So with this change, only a single texture can be bound to a texture unit. If another texture in bound to the same unit with a different target, we first unbind the texture from the current target.
There is less state to track, and it allows us to "unbind a texture unit" (whereas before we'd have to iterate through all the possible targets for that unit and unbind all of them).