Set the bit of "cross thread constant dara read length".

Submitted by Yan Wang on April 5, 2017, 7:20 a.m.

Details

Message ID 1491376848-29024-1-git-send-email-yan.wang@linux.intel.com
State New
Headers show
Series "Set the bit of "cross thread constant dara read length"." ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Yan Wang April 5, 2017, 7:20 a.m.
From: Yan Wang <yan.wang@linux.intel.com>

Set this bit to enable constant data sharing between GPU threads.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
---
 src/intel/intel_gpgpu.c   | 2 ++
 src/intel/intel_structs.h | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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