Skip to content

Commit b176e12

Browse files
wip
1 parent 8613a86 commit b176e12

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

androidgpulib/src/main/cpp/androidgpu.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,10 @@ Java_com_lib_androidgpulib_AndroidGPU_run(
359359
VkInstance instance;
360360
CHECK(vkCreateInstance(&instanceCreateInfo, 0, &instance));
361361

362-
VkPhysicalDevice physicalDevice = vkGetGPUs(instance)[0];
363-
// TODO usare tutte le GPU
362+
VkPhysicalDevice gpu = vkGetGPUs(instance)[0];
364363

365364
uint32_t queueFamilyIndex = 0;
366-
CHECK(vkGetBestComputeQueueNPH(physicalDevice, &queueFamilyIndex));
365+
CHECK(vkGetBestComputeQueueNPH(gpu, &queueFamilyIndex));
367366

368367
const float queuePrioritory = 1.0f;
369368
const VkDeviceQueueCreateInfo deviceQueueCreateInfo = {
@@ -389,11 +388,11 @@ Java_com_lib_androidgpulib_AndroidGPU_run(
389388
};
390389

391390
VkDevice device;
392-
CHECK(vkCreateDevice(physicalDevice, &deviceCreateInfo, 0, &device));
391+
CHECK(vkCreateDevice(gpu, &deviceCreateInfo, 0, &device));
393392

394393
VkPhysicalDeviceMemoryProperties properties;
395394

396-
vkGetPhysicalDeviceMemoryProperties(physicalDevice, &properties);
395+
vkGetPhysicalDeviceMemoryProperties(gpu, &properties);
397396

398397
const VkDeviceSize memorySize = calcMemorySize(env, output, input);
399398

0 commit comments

Comments
 (0)