diff options
author | Roland Scheidegger <sroland@vmware.com> | 2013-01-29 08:39:09 -0800 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2013-01-29 08:40:52 -0800 |
commit | 0eb588a37cc0427fd5c6a1ed2b212ed5d68f4dab (patch) | |
tree | ae53d37a9ae0ce46717757f4c7714548224c4c72 /src/gallium/auxiliary/draw/draw_vs_llvm.c | |
parent | 845130951f9f62a1baba9ae9ea2b234e83ac5c94 (diff) | |
download | external_mesa3d-0eb588a37cc0427fd5c6a1ed2b212ed5d68f4dab.zip external_mesa3d-0eb588a37cc0427fd5c6a1ed2b212ed5d68f4dab.tar.gz external_mesa3d-0eb588a37cc0427fd5c6a1ed2b212ed5d68f4dab.tar.bz2 |
draw: fix draw_llvm_variant_key struct padding to avoid recompiles
The struct padding got broken by c789b981b244333cfc903bcd1e2fefc010500013.
This caused serious performance regression because part of the key was
uninitialized and hence the shader always recompiled (at least on release
builds...).
While here also fix key size calculation when the number of samplers
and the number of sampler views are different.
v2: add comment
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_llvm.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_llvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c index 3e46f8c..ac3999e 100644 --- a/src/gallium/auxiliary/draw/draw_vs_llvm.c +++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c @@ -100,8 +100,9 @@ draw_create_vs_llvm(struct draw_context *draw, vs->variant_key_size = draw_llvm_variant_key_size( - vs->base.info.file_max[TGSI_FILE_INPUT]+1, - vs->base.info.file_max[TGSI_FILE_SAMPLER]+1); + vs->base.info.file_max[TGSI_FILE_INPUT]+1, + MAX2(vs->base.info.file_max[TGSI_FILE_SAMPLER]+1, + vs->base.info.file_max[TGSI_FILE_SAMPLER_VIEW]+1)); vs->base.state.stream_output = state->stream_output; vs->base.draw = draw; |