If texture variables are updated at run-time, i.e. while the shader is used, for example during post processing, changing a render target texture, there is no way to change is without a new configure step. That on the other hand requires some code to be run-through, so a simple dirty flag would just solve that problem.
During a backend render call, the run-time could check the variable if it has changed, and if so, just look up the new one.
The caveat thouhg, who is resetting the flag?
That flag could also be used to check if any constant/variable/uniform buffers need to be updated.
If texture variables are updated at run-time, i.e. while the shader is used, for example during post processing, changing a render target texture, there is no way to change is without a new
configurestep. That on the other hand requires some code to be run-through, so a simple dirty flag would just solve that problem.During a backend
rendercall, the run-time could check the variable if it has changed, and if so, just look up the new one.The caveat thouhg, who is resetting the flag?
That flag could also be used to check if any constant/variable/uniform buffers need to be updated.