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

Submitted by Yan Wang on April 5, 2017, 10:14 a.m.

Details

Message ID 201704051814534411823@linux.intel.com
State New
Headers show
Series "Set the bit of "cross thread constant dara read length"." ( rev: 2 ) in Beignet

Not browsing as part of any series.

Commit Message

Yan Wang April 5, 2017, 10:14 a.m.
This patch may not correct.
Need more investigation and change to adjust curbe_offset of patches for constant data sharing between GPU threads.
Please ignore it.
Sorry.



yan.wang
 
From: yan.wang

Date: 2017-04-05 15:20
To: beignet
CC: Yan Wang
Subject: [Beignet] [PATCH] Set the bit of "cross thread constant dara read length".
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(-)
 
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

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
-- 
2.7.4