OSDN Git Service

Uniform buffer uniform unpacking utility function
authorAlexis Hetu <sugoi@google.com>
Mon, 4 Apr 2016 19:41:51 +0000 (15:41 -0400)
committerAlexis Hétu <sugoi@google.com>
Thu, 7 Apr 2016 14:13:25 +0000 (14:13 +0000)
commitb9a781daacc6916098b4574a90425857670f041d
tree383586cb85a9ed51b314f835cc181108fcf8db3b
parent116bbc52ebee484246fb1aaa37230993467c5d4f
Uniform buffer uniform unpacking utility function

When data is packed into uniform blocks, some data isn't formatted in
a way that fits how data is usually represented, which is the case
for booleans and row major matrices. In these 2 cases, the variables
are unpacked into temporaries before being used. Booleans can be any
integer value and any non-zero value represents "true", so the value
in the uniform buffer has to go through an int to bool conversion
before being used. For row major matrices, a given register of that
matrix has to be transposed into a temporary before being used.

Change-Id: I0e001ceff2ce9be9a3570171e184586afc48c02d
Reviewed-on: https://swiftshader-review.googlesource.com/5040
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/compiler/OutputASM.cpp