[Beignet] [PATCH 6/8] BDW: Add BDW Device id to gen binary generater and binary serialize in backend.
Yang Rong
rong.r.yang at intel.com
Sun Sep 28 22:38:35 PDT 2014
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
backend/src/backend/gen_program.cpp | 7 ++++++-
backend/src/gbe_bin_generater.cpp | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
index 71a69dd..e94b9c0 100644
--- a/backend/src/backend/gen_program.cpp
+++ b/backend/src/backend/gen_program.cpp
@@ -207,7 +207,8 @@ namespace gbe {
#define DEVICE_MATCH(typeA, src_hw_info) ((IS_IVYBRIDGE(typeA) && !strcmp(src_hw_info, "IVB")) || \
(IS_IVYBRIDGE(typeA) && !strcmp(src_hw_info, "BYT")) || \
(IS_BAYTRAIL_T(typeA) && !strcmp(src_hw_info, "BYT")) || \
- (IS_HASWELL(typeA) && !strcmp(src_hw_info, "HSW")) )
+ (IS_HASWELL(typeA) && !strcmp(src_hw_info, "HSW")) || \
+ (IS_BROADWELL(typeA) && !strcmp(src_hw_info, "BDW")) )
static gbe_program genProgramNewFromBinary(uint32_t deviceID, const char *binary, size_t size) {
using namespace gbe;
@@ -298,6 +299,10 @@ namespace gbe {
src_hw_info[0]='H';
src_hw_info[1]='S';
src_hw_info[2]='W';
+ }else if(IS_BROADWELL(prog->deviceID)){
+ src_hw_info[0]='B';
+ src_hw_info[1]='D';
+ src_hw_info[2]='W';
}
FILL_DEVICE_ID(*binary, src_hw_info);
memcpy(*binary+BINARY_HEADER_LENGTH, oss.str().c_str(), sz*sizeof(char));
diff --git a/backend/src/gbe_bin_generater.cpp b/backend/src/gbe_bin_generater.cpp
index 79e3935..d89887a 100644
--- a/backend/src/gbe_bin_generater.cpp
+++ b/backend/src/gbe_bin_generater.cpp
@@ -174,6 +174,10 @@ void program_build_instance::serialize_program(void) throw(int)
src_hw_info[0]='H';
src_hw_info[1]='S';
src_hw_info[2]='W';
+ }else if(IS_BROADWELL(gen_pci_id)){
+ src_hw_info[0]='B';
+ src_hw_info[1]='D';
+ src_hw_info[2]='W';
}
if (str_fmt_out) {
--
1.8.3.2
More information about the Beignet
mailing list