summaryrefslogtreecommitdiff
path: root/backend/src
diff options
context:
space:
mode:
authorJunyan He <junyan.he@intel.com>2016-03-09 22:38:22 +0800
committerJunyan He <junyan.he@intel.com>2016-03-09 22:38:22 +0800
commitc5afe5121fa6e0ff1d761aefa6f393969affe4ac (patch)
tree20fd00db5dc011a4b4e89b8dda844538ca51e90c /backend/src
parent5b510e8d4f131a4269c4871a731fb391c470dcb7 (diff)
d
Diffstat (limited to 'backend/src')
-rw-r--r--backend/src/driver/cl_gen_gpu_state.cpp15
-rw-r--r--backend/src/driver/cl_gen_gpu_state.h4
2 files changed, 18 insertions, 1 deletions
diff --git a/backend/src/driver/cl_gen_gpu_state.cpp b/backend/src/driver/cl_gen_gpu_state.cpp
index f25fe2ef..bb127f7d 100644
--- a/backend/src/driver/cl_gen_gpu_state.cpp
+++ b/backend/src/driver/cl_gen_gpu_state.cpp
@@ -386,6 +386,15 @@ int GenGPUState::getCurbeSize(void)
return curbe_size;
}
+void GenGPUState::batchEnd(uint32_t flush_mode)
+{
+ /* Insert PIPE_CONTROL for time stamp of end*/
+ if (this->time_stamp_b.bo)
+ writeTimestamp(1);
+
+ this->postAction(flush_mode);
+}
+
/*****************************************************************************************
************************************** GEN7 *******************************************
*****************************************************************************************/
@@ -715,3 +724,9 @@ void Gen7GPUState::buildIdrt(drm_intel_bo* ker_bo, uint32_t curbe_sz,
this->aux_offset.idrt_offset + offsetof(gen6_interface_descriptor_t, desc2),
this->aux_buf.bo);
}
+
+void Gen7GPUState::postAction(int32_t flush_mode)
+{
+ if(flush_mode)
+ this->pipeControl();
+}
diff --git a/backend/src/driver/cl_gen_gpu_state.h b/backend/src/driver/cl_gen_gpu_state.h
index df34045d..ee366650 100644
--- a/backend/src/driver/cl_gen_gpu_state.h
+++ b/backend/src/driver/cl_gen_gpu_state.h
@@ -173,6 +173,7 @@ struct GenGPUState {
bool stateInit(uint32_t max_threads, uint32_t size_cs_entry, int profiling);
bool allocConstantBuffer(uint32_t size, uint8_t bti);
void batchStart(uint32_t use_slm);
+ void batchEnd(uint32_t flush_mode);
void walker(uint32_t simd_sz, uint32_t thread_n, const size_t global_wk_off[3],
const size_t global_wk_sz[3], const size_t local_wk_sz[3]);
void bindSamplers(uint32_t *samplers, size_t sampler_sz);
@@ -219,7 +220,8 @@ struct Gen7GPUState : public GenGPUState {
virtual void bindImage(uint32_t index, dri_bo* obj_bo, uint32_t obj_bo_offset,
uint32_t format, cl_mem_object_type type, uint32_t bpp,
int32_t w, int32_t h, int32_t depth, int32_t pitch,
- int32_t slice_pitch, int32_t tiling) = 0;
+ int32_t slice_pitch, int32_t tiling);
+ virtual void postAction(int32_t flush_mode);
};
#endif /* __CL_GEN_GPU_STATE_H__ */