Implement constant buffer based on constant cache

Graphics / Beignet - Ruiling Song [intel.com] - 4 September 2013 01:49 UTC

Currently, simply allocate enough graphics memory as constant memory space. And bind it to bti 2. Constant cache read are backed by dword scatter read. Different from other data port messages, the address need to be dword aligned, and the addresses are in units of dword.

The constant address space data are placed in order: first global constant, then the constant buffer kernel argument.

v2: change function & variable naming, to make clear 'curbe' and 'constant buffer'

1c24edd Implement constant buffer based on constant cache.
backend/src/backend/context.cpp | 12 +----
backend/src/backend/gen_insn_selection.cpp | 32 +++++++++++-
backend/src/backend/gen_reg_allocation.cpp | 1 -
backend/src/backend/program.h | 2 -
backend/src/ir/profile.cpp | 2 -
backend/src/ir/profile.hpp | 5 +-
backend/src/llvm/llvm_gen_backend.cpp | 9 +---
src/cl_command_queue.c | 18 -------
src/cl_command_queue.h | 3 --
src/cl_command_queue_gen7.c | 77 +++++++++++++++++++++++-----
src/cl_driver.h | 11 ++--
src/cl_driver_defs.c | 3 +-
src/cl_gt_device.h | 2 +-
src/cl_kernel.c | 10 ----
src/intel/intel_driver.c | 2 +-
src/intel/intel_gpgpu.c | 60 ++++++++++++++++++----
16 files changed, 158 insertions(+), 91 deletions(-)

Upstream: cgit.freedesktop.org


  • Share