Blender V4.3
gpu_py_platform.cc File Reference
#include <Python.h>
#include "BLI_utildefines.h"
#include "GPU_context.hh"
#include "GPU_platform.hh"
#include "gpu_py.hh"
#include "gpu_py_platform.hh"

Go to the source code of this file.

Functions

Functions
 PyDoc_STRVAR (pygpu_platform_vendor_get_doc, ".. function:: vendor_get()\n" "\n" " Get GPU vendor.\n" "\n" " :return: Vendor name.\n" " :rtype: str\n")
 
static PyObject * pygpu_platform_vendor_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_platform_renderer_get_doc, ".. function:: renderer_get()\n" "\n" " Get GPU to be used for rendering.\n" "\n" " :return: GPU name.\n" " :rtype: str\n")
 
static PyObject * pygpu_platform_renderer_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_platform_version_get_doc, ".. function:: version_get()\n" "\n" " Get GPU driver version.\n" "\n" " :return: Driver version.\n" " :rtype: str\n")
 
static PyObject * pygpu_platform_version_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_platform_device_type_get_doc, ".. function:: device_type_get()\n" "\n" " Get GPU device type.\n" "\n" " :return: Device type ('APPLE', 'NVIDIA', 'AMD', 'INTEL', 'SOFTWARE', 'QUALCOMM', " "'UNKNOWN').\n" " :rtype: str\n")
 
static PyObject * pygpu_platform_device_type_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_platform_backend_type_get_doc, ".. function:: backend_type_get()\n" "\n" " Get actuve GPU backend.\n" "\n" " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n" " :rtype: str\n")
 
static PyObject * pygpu_platform_backend_type_get (PyObject *)
 

Module

static PyMethodDef pygpu_platform__tp_methods []
 
static PyModuleDef pygpu_platform_module_def
 
 PyDoc_STRVAR (pygpu_platform__tp_doc, "This module provides access to GPU Platform definitions.")
 
PyObject * bpygpu_platform_init ()
 

Detailed Description

  • Use bpygpu_ for local API.
  • Use BPyGPU for public API.

Definition in file gpu_py_platform.cc.

Function Documentation

◆ bpygpu_platform_init()

PyObject * bpygpu_platform_init ( )

Definition at line 206 of file gpu_py_platform.cc.

References pygpu_platform_module_def.

Referenced by BPyInit_gpu().

◆ PyDoc_STRVAR() [1/6]

PyDoc_STRVAR ( pygpu_platform__tp_doc ,
"This module provides access to GPU Platform definitions."  )

◆ PyDoc_STRVAR() [2/6]

PyDoc_STRVAR ( pygpu_platform_backend_type_get_doc ,
".. function:: backend_type_get()\n" "\n" " Get actuve GPU backend.\n" "\n" " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n" " :rtype: str\n"  )

◆ PyDoc_STRVAR() [3/6]

PyDoc_STRVAR ( pygpu_platform_device_type_get_doc ,
".. function:: device_type_get()\n" "\n" " Get GPU device type.\n" "\n" " :return: Device type ('APPLE', 'NVIDIA', 'AMD', 'INTEL', 'SOFTWARE', 'QUALCOMM', " "'UNKNOWN').\n" " :rtype: str\n"  )

◆ PyDoc_STRVAR() [4/6]

PyDoc_STRVAR ( pygpu_platform_renderer_get_doc ,
".. function:: renderer_get()\n" "\n" " Get GPU to be used for rendering.\n" "\n" " :return: GPU name.\n" " :rtype: str\n"  )

◆ PyDoc_STRVAR() [5/6]

PyDoc_STRVAR ( pygpu_platform_vendor_get_doc ,
".. function:: vendor_get()\n" "\n" " Get GPU vendor.\n" "\n" " :return: Vendor name.\n" " :rtype: str\n"  )

◆ PyDoc_STRVAR() [6/6]

PyDoc_STRVAR ( pygpu_platform_version_get_doc ,
".. function:: version_get()\n" "\n" " Get GPU driver version.\n" "\n" " :return: Driver version.\n" " :rtype: str\n"  )

◆ pygpu_platform_backend_type_get()

static PyObject * pygpu_platform_backend_type_get ( PyObject * )
static

◆ pygpu_platform_device_type_get()

◆ pygpu_platform_renderer_get()

static PyObject * pygpu_platform_renderer_get ( PyObject * )
static

Definition at line 51 of file gpu_py_platform.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_platform_renderer().

◆ pygpu_platform_vendor_get()

static PyObject * pygpu_platform_vendor_get ( PyObject * )
static

Definition at line 35 of file gpu_py_platform.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_platform_vendor().

◆ pygpu_platform_version_get()

static PyObject * pygpu_platform_version_get ( PyObject * )
static

Definition at line 67 of file gpu_py_platform.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_platform_version().

Variable Documentation

◆ pygpu_platform__tp_methods

PyMethodDef pygpu_platform__tp_methods[]
static
Initial value:
= {
{"vendor_get",
METH_NOARGS,
pygpu_platform_vendor_get_doc},
{"renderer_get",
METH_NOARGS,
pygpu_platform_renderer_get_doc},
{"version_get",
METH_NOARGS,
pygpu_platform_version_get_doc},
{"device_type_get",
METH_NOARGS,
pygpu_platform_device_type_get_doc},
{"backend_type_get",
METH_NOARGS,
pygpu_platform_backend_type_get_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * pygpu_platform_device_type_get(PyObject *)
static PyObject * pygpu_platform_vendor_get(PyObject *)
static PyObject * pygpu_platform_version_get(PyObject *)
static PyObject * pygpu_platform_renderer_get(PyObject *)
static PyObject * pygpu_platform_backend_type_get(PyObject *)

Definition at line 162 of file gpu_py_platform.cc.

◆ pygpu_platform_module_def

PyModuleDef pygpu_platform_module_def
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"gpu.platform",
pygpu_platform__tp_doc,
0,
nullptr,
nullptr,
nullptr,
nullptr,
}
static PyMethodDef pygpu_platform__tp_methods[]

Definition at line 194 of file gpu_py_platform.cc.

Referenced by bpygpu_platform_init().