[Mesa-dev] [PATCH 7/8] i965/upload: Switch from < to <= in intel_upload_data().

Kenneth Graunke kenneth at whitecape.org
Thu Mar 13 01:57:15 PDT 2014


intel_upload_data() uses <, while intel_upload_map() uses <=.
Otherwise, the two blocks of code are identical.  This appears to be a
typo; we should be able to stage the exact amount of data that will fit
in the staging buffer.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/intel_upload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_upload.c b/src/mesa/drivers/dri/i965/intel_upload.c
index f6342c9..3abc314 100644
--- a/src/mesa/drivers/dri/i965/intel_upload.c
+++ b/src/mesa/drivers/dri/i965/intel_upload.c
@@ -159,7 +159,7 @@ intel_upload_data(struct brw_context *brw,
       brw->upload.buffer_len = 0;
    }
 
-   if (size < sizeof(brw->upload.buffer)) {
+   if (size <= sizeof(brw->upload.buffer)) {
       /* The new data is small enough to fit in the staging buffer, so
        * stage it to be copied to the BO later.
        */
-- 
1.9.0



More information about the mesa-dev mailing list