28 pygpu_platform_vendor_get_doc,
29 ".. function:: vendor_get()\n"
33 " :return: Vendor name.\n"
44 pygpu_platform_renderer_get_doc,
45 ".. function:: renderer_get()\n"
47 " Get GPU to be used for rendering.\n"
49 " :return: GPU name.\n"
60 pygpu_platform_version_get_doc,
61 ".. function:: version_get()\n"
63 " Get GPU driver version.\n"
65 " :return: Driver version.\n"
76 pygpu_platform_device_type_get_doc,
77 ".. function:: device_type_get()\n"
79 " Get GPU device type.\n"
81 " :return: Device type ('APPLE', 'NVIDIA', 'AMD', 'INTEL', 'SOFTWARE', 'QUALCOMM', "
111 return PyUnicode_FromString(device);
116 pygpu_platform_backend_type_get_doc,
117 ".. function:: backend_type_get()\n"
119 " Get actuve GPU backend.\n"
121 " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n"
127 const char *backend =
"UNKNOWN";
148 return PyUnicode_FromString(backend);
157#if (defined(__GNUC__) && !defined(__clang__))
158# pragma GCC diagnostic push
159# pragma GCC diagnostic ignored "-Wcast-function-type"
166 pygpu_platform_vendor_get_doc},
170 pygpu_platform_renderer_get_doc},
174 pygpu_platform_version_get_doc},
178 pygpu_platform_device_type_get_doc},
182 pygpu_platform_backend_type_get_doc},
183 {
nullptr,
nullptr, 0,
nullptr},
186#if (defined(__GNUC__) && !defined(__clang__))
187# pragma GCC diagnostic pop
192 pygpu_platform__tp_doc,
193 "This module provides access to GPU Platform definitions.");
195 PyModuleDef_HEAD_INIT,
197 pygpu_platform__tp_doc,
eGPUBackendType GPU_backend_get_type()
#define BPYGPU_IS_INIT_OR_ERROR_OBJ