diff options
author | Eric Anholt <[email protected]> | 2016-08-02 16:01:34 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-08-03 10:55:54 -0700 |
commit | bc1fc9c98539f38f5a29b314d4a993a2e2f7ca0a (patch) | |
tree | 06709a819a2d87b53148f2b777afc71e656126b5 /src/gallium/drivers/vc4/vc4_qir.h | |
parent | e97e9e62a1de9689ce8a2a77cb9657b387a1d14b (diff) |
vc4: Avoid generating a custom shader per level in glGenerateMipmaps().
We were baking in the LOD of the source level to each shader. Instead,
pass it in as a uniform -- this requires storing it to a temp register,
but that's better than compiling a ton of separate shaders:
total instructions in shared programs: 115032 -> 115036 (0.00%)
instructions in affected programs: 96 -> 100 (4.17%)
LOST: 572
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index 81b55651cec..b8ded30711c 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -246,6 +246,8 @@ enum quniform_contents { /** A reference to a texture config parameter 2 cubemap stride uniform */ QUNIFORM_TEXTURE_CONFIG_P2, + QUNIFORM_TEXTURE_FIRST_LEVEL, + QUNIFORM_TEXTURE_MSAA_ADDR, QUNIFORM_UBO_ADDR, @@ -314,7 +316,7 @@ struct vc4_key { unsigned compare_func:3; unsigned wrap_s:3; unsigned wrap_t:3; - unsigned forced_first_level:8; + bool force_first_level:1; }; struct { uint16_t msaa_width, msaa_height; |