After we take first 64KB page table entries. we would make sure the global memory will not be allocated in the range [0, 64KB]. this is needed, so that we can easily differentiate local/global address space.
Signed-off-by: Ruiling Song <ruiling.s...@intel.com> --- src/intel/intel_gpgpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c index 110c36f..935595e 100644 --- a/src/intel/intel_gpgpu.c +++ b/src/intel/intel_gpgpu.c @@ -953,8 +953,13 @@ intel_gpgpu_state_init(intel_gpgpu_t *gpgpu, /* make sure aux buffer is page aligned */ size_aux = ALIGN(size_aux, 4096); + // we need to take the first 64KB page table entry, so that global memory and + // local memory address space are separated. we may need a better way to do this. + if (size_aux < 64*1024) size_aux = 64*1024; bo = dri_bo_alloc(gpgpu->drv->bufmgr, "AUX_BUFFER", size_aux, 4096); + drm_intel_bo_set_softpin_offset(bo, 0); + if (!bo || dri_bo_map(bo, 1) != 0) { fprintf(stderr, "%s:%d: %s.\n", __FILE__, __LINE__, strerror(errno)); if (bo) -- 2.4.1 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet