compiler/glsl: refactor empty_uniform_block utilities to linker_util
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 26 Jun 2018 14:28:59 +0000 (16:28 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 3 Jul 2018 10:37:32 +0000 (12:37 +0200)
commitb0712df6cfbc40ce770077a12e7e2beccd692019
treec6c7e27dd27f695e3dfec62492a6991392c4cfb5
parent995d9937103771d9318124b91adfd20d7c6d5fed
compiler/glsl: refactor empty_uniform_block utilities to linker_util

This includes:
  * Move the defition of empty_uniform_block to linker_util.h
  * Move find_empty_block (with a rename) to linker_util.h
  * Refactor some code at linker.cpp to a new method at linker_util.h
    (link_util_update_empty_uniform_locations)

So all that code could be used by the GLSL linker and the NIR linker
used for ARB_gl_spirv.

v2: include just "ir_uniform.h" (Timothy Arceri)

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/link_uniforms.cpp
src/compiler/glsl/linker.cpp
src/compiler/glsl/linker.h
src/compiler/glsl/linker_util.cpp
src/compiler/glsl/linker_util.h