[Mesa-dev] [PATCH] [RFC] r600g/compute: Solving the mapping bug

Bruno Jiménez brunojimen at gmail.com
Fri May 30 08:24:42 PDT 2014


Hi,

This is my first attempt to fix a bug that the r600g/compute
code has when handling mapped buffers in OpenCL.

I have written a small document explaining more or less what
is the bug I am trying to solve, and the approach I have chosen
to solve it with this patch:
https://www.dropbox.com/s/qwkpod33hg3uu07/mapping_bug.pdf

I sent a test for this bug to the piglit mailing list:
http://lists.freedesktop.org/archives/piglit/2014-May/010807.html
And this patch fixes it.

Unfortunately, a couple of days ago I reread the OpenCL 1.2 spec
and discovered that it allows buffers to be mapped for reading
and launch kernels that read from them. So, my patch has a bug
in this case.

I have also sent a test for this allowed behavior to the piglit
mailing list:
http://lists.freedesktop.org/archives/piglit/2014-May/010922.html
And as expected, this patch breaks it :(

I'll continue to think of some way of solving both bugs.

Thanks!
Bruno

Bruno Jiménez (1):
  r600g/compute: solve the mapping bug

 src/gallium/drivers/r600/compute_memory_pool.c | 21 ++++++++++++++++++++-
 src/gallium/drivers/r600/compute_memory_pool.h |  2 ++
 src/gallium/drivers/r600/evergreen_compute.c   | 18 +++++++++++++-----
 3 files changed, 35 insertions(+), 6 deletions(-)

-- 
1.9.3



More information about the mesa-dev mailing list