summaryrefslogtreecommitdiffstats
path: root/src/broadcom/compiler/v3d_compiler.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-03-19 11:39:58 -0700
committerEric Anholt <[email protected]>2019-03-21 14:20:50 -0700
commit320e96baced8093c6af11d86a216d83cee1eeb30 (patch)
treeccd26e9344f16640e17212171a4d4d558139da46 /src/broadcom/compiler/v3d_compiler.h
parentc36d2793ec79a8cee75953acbc87b621fbd25e49 (diff)
v3d: Move constant offsets to UBO addresses into the main uniform stream.
We'd end up with the constant offset in the uniform stream anyway, since they're bigger than small immediates. Avoids the extra uniforms and adds in the shader in favor of just adding once on the CPU. shader-db: total instructions in shared programs: 6496865 -> 6494851 (-0.03%) total uniforms in shared programs: 2119511 -> 2117243 (-0.11%)
Diffstat (limited to 'src/broadcom/compiler/v3d_compiler.h')
-rw-r--r--src/broadcom/compiler/v3d_compiler.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h
index 81307e0996f..d8d916fb14b 100644
--- a/src/broadcom/compiler/v3d_compiler.h
+++ b/src/broadcom/compiler/v3d_compiler.h
@@ -283,6 +283,7 @@ enum quniform_contents {
static inline uint32_t v3d_unit_data_create(uint32_t unit, uint32_t value)
{
+ assert(value < (1 << 24));
return unit << 24 | value;
}