[Mesa-dev] [PATCH 0/4] glCompressedTex(Sub)Image(2, 3) on mapped PBOs

Eduardo Lima Mitev elima at igalia.com
Thu Mar 5 00:20:09 PST 2015


Hi Ian,

I finally came up with 4 patches that essentially do what you proposed:

First patch (1/4) removes the checks from driver code.

Patch 2/4 fixes an error I hit in the PBO boundary access validation.

Patch 3/4 factorizes validation code in pbo.c, which is currently mixed
with buffer mapping functionality, preventing its reuse.

And finally patch 4/4 adds the PBO checks back, this time in the error
checking functions of gl(Compressed)Tex(Sub)Image.

So, for perf testing we want to group patches in (1), and (2,3,4).

There are no piglit regressions observed. 4 previously failing dEQP
tests pass now.

I think both teximage.c and pbo.c could use a bit of cleaning and
refactoring. They are quite messy right now, IMHO.

Notice that there are still calls to _mesa_validate_pbo_access() in
driver code (dri/i915/intel_pixel_bitmap.c, dri/i965/intel_pixel_bitmap.c
and x11/xm_dd.c), but I rather tackle those in a separate issue to avoid
making this series more complex.

cheers,

Eduardo


Eduardo Lima Mitev (4):
  meta: Remove error checks for texture <-> pixel-buffer transfers that
    don't belong in driver code
  mesa: Set the correct image size in _mesa_validate_pbo_access()
  mesa: Separate PBO validation checks from buffer mapping, to allow
    reuse
  mesa: Check for valid PBO access in gl(Compressed)Tex(Sub)Image calls

 src/mesa/drivers/common/meta_tex_subimage.c |  44 ----------
 src/mesa/main/pbo.c                         | 119 ++++++++++++++++++++--------
 src/mesa/main/pbo.h                         |  14 ++++
 src/mesa/main/teximage.c                    |  51 +++++++++---
 4 files changed, 143 insertions(+), 85 deletions(-)

-- 
2.1.3



More information about the mesa-dev mailing list