summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-17 10:36:26 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2011-05-29 23:51:41 +0100
commitd47221b094ef1344ddd349fffd5fc92be12a9b6c (patch)
treec176a4d145f7a392084edadd05e0a869f29d27af
parentdba96684a5db6cbbbf9bb3f154c906a4ccb6b137 (diff)
intel: Beware the unsigned promotion when checking for batch overflows
Reported-by: Modestas Vainius <geromanas@mailas.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=36319 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a51cd83d25f2f9f2107219d5671194f931601244) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r--src/intel_batchbuffer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index 86e65444..3022f254 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -50,14 +50,14 @@ static inline int intel_vertex_space(intel_screen_private *intel)
}
static inline void
-intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, unsigned int sz)
+intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, int sz)
{
assert(sz < intel->batch_bo->size - 8);
if (intel_batch_space(intel) < sz)
intel_batch_submit(scrn);
}
-static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, unsigned int sz)
+static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, int sz)
{
intel_screen_private *intel = intel_get_screen_private(scrn);