gctINT loopCount;
gcuVIDMEM_NODE_PTR node = gcvNULL;
gctBOOL tileStatusInVirtual;
+ gctBOOL forceContiguous = gcvFALSE;
gcmkHEADER_ARG("Kernel=0x%x *Pool=%d Bytes=%lu Alignment=%lu Type=%d",
Kernel, *Pool, Bytes, Alignment, Type);
/* Get initial pool. */
switch (pool = *Pool)
{
+ case gcvPOOL_DEFAULT_FORCE_CONTIGUOUS:
+ forceContiguous = gcvTRUE;
case gcvPOOL_DEFAULT:
case gcvPOOL_LOCAL:
pool = gcvPOOL_LOCAL_INTERNAL;
loopCount = (gctINT) gcvPOOL_NUMBER_OF_POOLS;
break;
+ case gcvPOOL_DEFAULT_FORCE_CONTIGUOUS_CACHEABLE:
+ pool = gcvPOOL_CONTIGUOUS;
+ loopCount = 1;
+ forceContiguous = gcvTRUE;
+ break;
+
default:
loopCount = 1;
break;
if (pool == gcvPOOL_CONTIGUOUS)
{
#if gcdCONTIGUOUS_SIZE_LIMIT
- if (Bytes > gcdCONTIGUOUS_SIZE_LIMIT)
+ if (Bytes > gcdCONTIGUOUS_SIZE_LIMIT && forceContiguous == gcvFALSE)
{
status = gcvSTATUS_OUT_OF_MEMORY;
}
status = gckVIDMEM_ConstructVirtual(Kernel, gcvTRUE, Bytes, &node);
}
- if (gcmIS_SUCCESS(status))
+ if (gcmIS_SUCCESS(status) || forceContiguous == gcvTRUE)
{
/* Memory allocated. */
break;