intel: export batch_buffer_reloc_count
diff --git a/icd/intel/cmd.c b/icd/intel/cmd.c
index 5a888ae..c2237b9 100644
--- a/icd/intel/cmd.c
+++ b/icd/intel/cmd.c
@@ -147,7 +147,7 @@
if (cmd->flags != flags || !bo_size) {
cmd->flags = flags;
- bo_size = cmd->dev->gpu->batch_buffer_size;
+ bo_size = cmd->dev->gpu->max_batch_buffer_size;
if (flags & XGL_CMD_BUFFER_OPTIMIZE_GPU_SMALL_BATCH_BIT)
bo_size /= 2;
diff --git a/icd/intel/gpu.c b/icd/intel/gpu.c
index 4372929..e2aa305 100644
--- a/icd/intel/gpu.c
+++ b/icd/intel/gpu.c
@@ -115,7 +115,11 @@
gpu->gen_opaque = gen;
/* 8192 dwords */
- gpu->batch_buffer_size = sizeof(uint32_t) * 8192;
+ gpu->max_batch_buffer_size = sizeof(uint32_t) * 8192;
+
+ /* the winsys is prepared for one reloc every two dwords, then minus 2 */
+ gpu->batch_buffer_reloc_count =
+ gpu->max_batch_buffer_size / sizeof(uint32_t) / 2 - 2;
gpu->fd_internal = -1;
gpu->fd = -1;
@@ -231,9 +235,7 @@
memcpy(props->gpuName, name, name_len);
props->gpuName[name_len] = '\0';
- /* the winsys is prepared for one reloc every two dwords, then minus 2 */
- props->maxMemRefsPerSubmission =
- gpu->batch_buffer_size / sizeof(uint32_t) / 2 - 2;
+ props->maxMemRefsPerSubmission = gpu->batch_buffer_reloc_count;
props->virtualMemPageSize = 4096;
diff --git a/icd/intel/gpu.h b/icd/intel/gpu.h
index fac16bc..e5d8db3 100644
--- a/icd/intel/gpu.h
+++ b/icd/intel/gpu.h
@@ -50,7 +50,8 @@
char *path; /* path to the render or legacy node, or NULL */
int gen_opaque; /* always read with intel_gpu_gen() */
- int batch_buffer_size;
+ XGL_SIZE max_batch_buffer_size;
+ XGL_UINT batch_buffer_reloc_count;
/*
* The enabled hardware features could be limited by the kernel. This