Uniform block declaration

A few aspects of block declaration are improved upon here:
- Block definitions are computed and stored for later use.
  The data stored are the block member types and a map to
  convert from register offsets, based on the internal
  memory layout, to the std140 layout.
- Declaration of block members is possible. When a block
  member is declared prior to the entire block being
  declared, OutputASM::declareUniform() will first declare
  the whole block and return the index of the block member.
  If the block member is part of an already defined block,
  the function declares no new variables and returns the
  block member's register index.

Change-Id: If1368bc8de20a0f86169361d76858c3f3e34bb07
Reviewed-on: https://swiftshader-review.googlesource.com/4632
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
2 files changed