Table-driven dirty-flags for Vulkan and D3D9. Minor Vulkan optimization.

This commit is contained in:
Henrik Rydgard 2017-01-24 13:13:09 +01:00
parent 1fe32d380b
commit d85888dc2b
6 changed files with 248 additions and 593 deletions

View file

@ -428,9 +428,12 @@ void ShaderManagerVulkan::DirtyLastShader() { // disables vertex arrays
uint32_t ShaderManagerVulkan::UpdateUniforms() {
uint32_t dirty = gstate_c.GetDirtyUniforms();
if (dirty != 0) {
BaseUpdateUniforms(dirty);
LightUpdateUniforms(dirty);
BoneUpdateUniforms(dirty);
if (dirty & DIRTY_BASE_UNIFORMS)
BaseUpdateUniforms(dirty);
if (dirty & DIRTY_LIGHT_UNIFORMS)
LightUpdateUniforms(dirty);
if (dirty & DIRTY_BONE_UNIFORMS)
BoneUpdateUniforms(dirty);
}
gstate_c.CleanUniforms();
return dirty;