D3D: Add a function to retrieve a mask of the used texture in a shader.