summaryrefslogtreecommitdiffstats
path: root/src/compiler/blob.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-11-28 08:20:39 -0800
committerKenneth Graunke <[email protected]>2017-11-29 17:30:35 -0800
commitca4361658635f2b401e9793c0b982721998ecb70 (patch)
treee4c6f7173a261a6184cdfa518d35336eed77cd0f /src/compiler/blob.h
parent52d32917e1f3f70abcbcff5508f7423e94626b41 (diff)
i965: Don't grow batch/state buffer on every emit after an overflow.
Once we reach the intended size of the buffer (BATCH_SZ or STATE_SZ), we try and flush. If we're not allowed to flush, we resort to growing the buffer so that there's space for the data we need to emit. We accidentally got the threshold wrong. The first non-wrappable call beyond (e.g.) STATE_SZ would grow the buffer to floor(1.5 * STATE_SZ), The next call would see we were beyond STATE_SZ and think we needed to grow a second time - when the buffer was already large enough. We still want to flush when we hit STATE_SZ, but for growing, we should use the actual size of the buffer as the threshold. This way, we only grow when actually necessary. v2: Simplify the control flow (suggested by Jordan) Fixes: 2dfc119f22f257082ab0 "i965: Grow the batch/state buffers if we need space and can't flush." Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/blob.h')
0 files changed, 0 insertions, 0 deletions