demos: Be sure to request correct memory type
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 25 Feb 2015 18:48:28 +0000 (11:48 -0700)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 26 Feb 2015 00:15:47 +0000 (17:15 -0700)
demos/cube.c
demos/tri.c

index 5ea5b24886b717c2fbe9cc4ceaba1077feca5791..37db0de95c86b8a0ecf119b51d219feb145c95f0 100644 (file)
@@ -788,6 +788,7 @@ static void demo_prepare_texture_image(struct demo *demo,
     mem_alloc.memProps = XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT;
     for (uint32_t j = 0; j < num_allocations; j ++) {
         mem_alloc.allocationSize = mem_reqs[j].size;
+        mem_alloc.memType = mem_reqs[j].memType;
 
         /* allocate memory */
         err = xglAllocMemory(demo->device, &mem_alloc,
index e497c6706f2be1d072c4008895f97a2ad22e1916..b10037acd9008ea346c42011cd2df9aa2d9da389 100644 (file)
@@ -458,6 +458,7 @@ static void demo_prepare_texture_image(struct demo *demo,
     mem_alloc.memProps = XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT;
     for (uint32_t j = 0; j < num_allocations; j ++) {
         mem_alloc.allocationSize = mem_reqs[j].size;
+        mem_alloc.memType = mem_reqs[j].memType;
 
         /* allocate memory */
         err = xglAllocMemory(demo->device, &mem_alloc,