memory alloc: Add MEMORY_ALLOCATION_COUNT support and usage in tests.
Driver always does one allocation but tests support drivers with N allocations.
Conflicts:
demos/cube.c
demos/tri.c
tests/image_tests.cpp
tests/render_tests.cpp
diff --git a/icd/intel/obj.c b/icd/intel/obj.c
index 817affa..eb502e7 100644
--- a/icd/intel/obj.c
+++ b/icd/intel/obj.c
@@ -49,6 +49,7 @@
{
XGL_RESULT ret = XGL_SUCCESS;
XGL_SIZE s;
+ XGL_UINT *count;
switch (type) {
case XGL_INFO_TYPE_MEMORY_REQUIREMENTS:
@@ -59,6 +60,13 @@
memset(data, 0, s);
break;
+ case XGL_INFO_TYPE_MEMORY_ALLOCATION_COUNT:
+ *size = sizeof(XGL_UINT);
+ if (data == NULL)
+ return ret;
+ count = (XGL_UINT *) data;
+ *count = 1;
+ break;
default:
ret = XGL_ERROR_INVALID_VALUE;
break;