struct ilo_dev_info {
/* these mirror intel_winsys_info */
int devid;
+ int max_batch_size;
bool has_llc;
bool has_gen7_sol_reset;
bool has_address_swizzling;
{
struct ilo_screen *is = ilo_screen(screen);
struct ilo_context *ilo;
+ int cp_size;
ilo = CALLOC_STRUCT(ilo_context);
if (!ilo)
util_slab_create(&ilo->transfer_mempool,
sizeof(struct ilo_transfer), 64, UTIL_SLAB_SINGLETHREADED);
- ilo->cp = ilo_cp_create(ilo->winsys, is->dev.has_llc);
+ /* 8192 DWords */
+ cp_size = 8192;
+ if (cp_size * 4 > is->dev.max_batch_size)
+ cp_size = is->dev.max_batch_size / 4;
+
+ ilo->cp = ilo_cp_create(ilo->winsys, cp_size, is->dev.has_llc);
ilo->shader_cache = ilo_shader_cache_create();
if (ilo->cp)
ilo->hw3d = ilo_3d_create(ilo->cp, ilo->dev);
* Create a command parser.
*/
struct ilo_cp *
-ilo_cp_create(struct intel_winsys *winsys, bool direct_map)
+ilo_cp_create(struct intel_winsys *winsys, int size, bool direct_map)
{
struct ilo_cp *cp;
cp->ring = ILO_CP_RING_RENDER;
cp->no_implicit_flush = false;
- cp->bo_size = 8192;
+ cp->bo_size = size;
if (!direct_map) {
cp->sys = MALLOC(cp->bo_size * 4);
};
struct ilo_cp *
-ilo_cp_create(struct intel_winsys *winsys, bool direct_map);
+ilo_cp_create(struct intel_winsys *winsys, int size, bool direct_map);
void
ilo_cp_destroy(struct ilo_cp *cp);
init_dev(struct ilo_dev_info *dev, const struct intel_winsys_info *info)
{
dev->devid = info->devid;
+ dev->max_batch_size = info->max_batch_size;
dev->has_llc = info->has_llc;
dev->has_gen7_sol_reset = info->has_gen7_sol_reset;
dev->has_address_swizzling = info->has_address_swizzling;
info->devid = drm_intel_bufmgr_gem_get_devid(winsys->bufmgr);
+ info->max_batch_size = BATCH_SZ;
+
get_param(winsys, I915_PARAM_HAS_LLC, &val);
info->has_llc = val;
struct intel_winsys_info {
int devid;
+ int max_batch_size;
bool has_llc;
bool has_gen7_sol_reset;
bool has_address_swizzling;