[Beignet] [PATCH] Set the bit of "cross thread constant dara read length".
yan.wang at linux.intel.com
yan.wang at linux.intel.com
Wed Apr 5 07:20:48 UTC 2017
From: Yan Wang <yan.wang at linux.intel.com>
Set this bit to enable constant data sharing between GPU threads.
Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
src/intel/intel_gpgpu.c | 2 ++
src/intel/intel_structs.h | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c
index 041938f..d56ef04 100644
--- a/src/intel/intel_gpgpu.c
+++ b/src/intel/intel_gpgpu.c
@@ -1704,6 +1704,7 @@ intel_gpgpu_build_idrt_gen8(intel_gpgpu_t *gpgpu, cl_gpgpu_kernel *kernel)
slm_sz = 64*KB;
slm_sz = slm_sz >> 12;
desc->desc6.slm_sz = slm_sz;
+ desc->desc7.cross_thread_constant_read_len = kernel->curbe_sz / 32;
}
static void
@@ -1748,6 +1749,7 @@ intel_gpgpu_build_idrt_gen9(intel_gpgpu_t *gpgpu, cl_gpgpu_kernel *kernel)
else
slm_sz = 7;
desc->desc6.slm_sz = slm_sz;
+ desc->desc7.cross_thread_constant_read_len = kernel->curbe_sz / 32;
}
static int
diff --git a/src/intel/intel_structs.h b/src/intel/intel_structs.h
index b38cc42..787c192 100644
--- a/src/intel/intel_structs.h
+++ b/src/intel/intel_structs.h
@@ -151,7 +151,10 @@ typedef struct gen8_interface_descriptor
uint32_t barrier_return_grf_offset:8;
} desc6;
- uint32_t desc7; /* unused */
+ struct {
+ uint32_t cross_thread_constant_read_len:8;
+ uint32_t pad:24;
+ } desc7;
} gen8_interface_descriptor_t;
typedef struct gen7_surface_state
--
2.7.4
More information about the Beignet
mailing list