icd:Expand mock icd memory type bit support
authorTobin Ehlis <tobine@google.com>
Tue, 14 Nov 2017 16:52:17 +0000 (09:52 -0700)
committerTobin Ehlis <tobine@google.com>
Fri, 17 Nov 2017 16:38:09 +0000 (09:38 -0700)
Image/buffer memory requirement memoryTypeBits are still just hard-
coded in mock icd, but expand to support more bits for more simulated
memory types. This helps the mock work in conjunction with the devsim
layer so that if a simulated device has more than 5 memory types, the
mock icd won't cause an error.

scripts/mock_icd_generator.py

index c0757e2..7a10c5d 100644 (file)
@@ -632,7 +632,7 @@ CUSTOM_C_INTERCEPTS = {
     // TODO: Just hard-coding reqs for now
     pMemoryRequirements->size = 4096;
     pMemoryRequirements->alignment = 1;
-    pMemoryRequirements->memoryTypeBits = 0x1F;
+    pMemoryRequirements->memoryTypeBits = 0xFFFF;
 ''',
 'vkGetBufferMemoryRequirements2KHR': '''
     GetBufferMemoryRequirements(device, pInfo->buffer, &pMemoryRequirements->memoryRequirements);
@@ -641,7 +641,7 @@ CUSTOM_C_INTERCEPTS = {
     // TODO: Just hard-coding reqs for now
     pMemoryRequirements->size = 4096;
     pMemoryRequirements->alignment = 1;
-    pMemoryRequirements->memoryTypeBits = 0x1F;
+    pMemoryRequirements->memoryTypeBits = 0xFFFF;
 ''',
 'vkGetImageMemoryRequirements2KHR': '''
     GetImageMemoryRequirements(device, pInfo->image, &pMemoryRequirements->memoryRequirements);