mesa/src
Kenneth Graunke 447afbf31b 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: 2dfc119f22 "i965: Grow the batch/state buffers if we need space and can't flush."
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit ca43616586)
2017-12-01 17:09:03 +00:00
..
amd radv: Free temporary syncobj after waiting on it. 2017-11-17 19:24:29 +00:00
broadcom broadcom/vc5: Remove unused v3d_compiler.c 2017-11-13 17:17:16 +00:00
compiler glsl: fix interpolateAtXxx(some_vec[idx], ...) with dynamic idx 2017-11-29 19:42:26 +00:00
egl egl/wayland: Add a fallback when fourcc query isn't supported 2017-11-17 19:24:29 +00:00
gallium radeonsi/gfx9: fix importing shared textures with DCC 2017-12-01 17:07:20 +00:00
gbm meson: build libEGL 2017-10-20 16:46:48 -07:00
getopt
glx glx/dri3: Fix passing renderType into glXCreateContext 2017-11-17 19:24:29 +00:00
gtest meson: convert gtest to an internal dependency 2017-10-03 10:02:08 -07:00
hgl
intel i965/fs: Handle negating immediates on MADs when propagating saturates 2017-11-24 18:48:33 +00:00
loader loader/dri3: Improve dri3 thread-safety 2017-11-17 19:24:29 +00:00
mapi gl_table.py: add extern C guard for the generated glapitable.h 2017-11-27 19:26:16 +00:00
mesa i965: Don't grow batch/state buffer on every emit after an overflow. 2017-12-01 17:09:03 +00:00
util util: Fix disk_cache index calculation on big endian 2017-11-27 18:33:40 +00:00
vulkan meson: move wayland_drm_protocol generation to wayland-drm 2017-10-20 16:46:48 -07:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am automake: include git_sha1.h.in in release tarball 2017-11-13 17:17:15 +00:00
meson.build meson: build libEGL 2017-10-20 16:46:48 -07:00
SConscript scons: use python3-compatible print() 2017-09-25 11:57:12 +01:00