Blender V4.3
gpu_py_capabilities.cc File Reference
#include <Python.h>
#include "BLI_utildefines.h"
#include "GPU_capabilities.hh"
#include "gpu_py.hh"
#include "gpu_py_capabilities.hh"

Go to the source code of this file.

Functions

Functions
 PyDoc_STRVAR (pygpu_max_texture_size_get_doc, ".. function:: max_texture_size_get()\n" "\n" " Get estimated maximum texture size to be able to handle.\n" "\n" " :return: Texture size.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_texture_size_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_texture_layers_get_doc, ".. function:: max_texture_layers_get()\n" "\n" " Get maximum number of layers in texture.\n" "\n" " :return: Number of layers.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_texture_layers_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_textures_get_doc, ".. function:: max_textures_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the vertex shader and the\n" " fragment processor.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_textures_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_textures_vert_get_doc, ".. function:: max_textures_vert_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the vertex shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_textures_vert_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_textures_geom_get_doc, ".. function:: max_textures_geom_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the geometry shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_textures_geom_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_textures_frag_get_doc, ".. function:: max_textures_frag_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the fragment shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_textures_frag_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_images_get_doc, ".. function:: max_images_get()\n" "\n" " Get maximum supported number of image units.\n" "\n" " :return: Number of image units.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_images_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_uniforms_vert_get_doc, ".. function:: max_uniforms_vert_get()\n" "\n" " Get maximum number of values held in uniform variable\n" " storage for a vertex shader.\n" "\n" " :return: Number of values.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_uniforms_vert_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_uniforms_frag_get_doc, ".. function:: max_uniforms_frag_get()\n" "\n" " Get maximum number of values held in uniform variable\n" " storage for a fragment shader.\n" "\n" " :return: Number of values.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_uniforms_frag_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_batch_indices_get_doc, ".. function:: max_batch_indices_get()\n" "\n" " Get maximum number of vertex array indices.\n" "\n" " :return: Number of indices.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_batch_indices_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_batch_vertices_get_doc, ".. function:: max_batch_vertices_get()\n" "\n" " Get maximum number of vertex array vertices.\n" "\n" " :return: Number of vertices.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_batch_vertices_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_vertex_attribs_get_doc, ".. function:: max_vertex_attribs_get()\n" "\n" " Get maximum number of vertex attributes accessible to\n" " a vertex shader.\n" "\n" " :return: Number of attributes.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_vertex_attribs_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_varying_floats_get_doc, ".. function:: max_varying_floats_get()\n" "\n" " Get maximum number of varying variables used by\n" " vertex and fragment shaders.\n" "\n" " :return: Number of variables.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_varying_floats_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_extensions_get_doc, ".. function:: extensions_get()\n" "\n" " Get supported extensions in the current context.\n" "\n" " :return: Extensions.\n" " :rtype: tuple[str]\n")
 
static PyObject * pygpu_extensions_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_compute_shader_support_get_doc, ".. function:: compute_shader_support_get()\n" "\n" " Are compute shaders supported.\n" "\n" " :return: True when supported, False when not supported.\n" " :rtype: bool\n")
 
static PyObject * pygpu_compute_shader_support_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_shader_image_load_store_support_get_doc, ".. function:: shader_image_load_store_support_get()\n" "\n" " Is image load/store supported.\n" "\n" " :return: True when supported, False when not supported.\n" " :rtype: bool\n")
 
static PyObject * pygpu_shader_image_load_store_support_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_hdr_support_get_doc, ".. function:: hdr_support_get()\n" "\n" " Return whether GPU backend supports High Dynamic range for viewport.\n" "\n" " :return: HDR support available.\n" " :rtype: bool\n")
 
static PyObject * pygpu_hdr_support_get (PyObject *)
 
 PyDoc_STRVAR (pygpu_max_work_group_count_get_doc, ".. function:: max_work_group_count_get(index)\n" "\n" " Get maximum number of work groups that may be dispatched to a compute shader.\n" "\n" " :arg index: Index of the dimension.\n" " :type index: int\n" " :return: Maximum number of work groups for the queried dimension.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_work_group_count_get (PyObject *, PyObject *args)
 
 PyDoc_STRVAR (pygpu_max_work_group_size_get_doc, ".. function:: max_work_group_size_get(index)\n" "\n" " Get maximum size of a work group that may be dispatched to a compute shader.\n" "\n" " :arg index: Index of the dimension.\n" " :type index: int\n" " :return: Maximum size of a work group for the queried dimension.\n" " :rtype: int\n")
 
static PyObject * pygpu_max_work_group_size_get (PyObject *, PyObject *args)
 

Module

static PyMethodDef pygpu_capabilities__tp_methods []
 
static PyModuleDef pygpu_capabilities_module_def
 
 PyDoc_STRVAR (pygpu_capabilities__tp_doc, "This module provides access to the GPU capabilities.")
 
PyObject * bpygpu_capabilities_init ()
 

Detailed Description

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

Definition in file gpu_py_capabilities.cc.

Function Documentation

◆ bpygpu_capabilities_init()

PyObject * bpygpu_capabilities_init ( )

Definition at line 492 of file gpu_py_capabilities.cc.

References pygpu_capabilities_module_def.

Referenced by BPyInit_gpu().

◆ PyDoc_STRVAR() [1/20]

PyDoc_STRVAR ( pygpu_capabilities__tp_doc ,
"This module provides access to the GPU capabilities."  )

◆ PyDoc_STRVAR() [2/20]

PyDoc_STRVAR ( pygpu_compute_shader_support_get_doc ,
".. function:: compute_shader_support_get()\n" "\n" " Are compute shaders supported.\n" "\n" " :return: True when supported,
False when not supported.\n" " :rtype:bool\n"  )

◆ PyDoc_STRVAR() [3/20]

PyDoc_STRVAR ( pygpu_extensions_get_doc ,
".. function:: extensions_get()\n" "\n" " Get supported extensions in the current context.\n" "\n" " :return: Extensions.\n" " :rtype: tuple\n" [str] )

◆ PyDoc_STRVAR() [4/20]

PyDoc_STRVAR ( pygpu_hdr_support_get_doc ,
".. function:: hdr_support_get()\n" "\n" " Return whether GPU backend supports High Dynamic range for viewport.\n" "\n" " :return: HDR support available.\n" " :rtype: bool\n"  )

◆ PyDoc_STRVAR() [5/20]

PyDoc_STRVAR ( pygpu_max_batch_indices_get_doc ,
".. function:: max_batch_indices_get()\n" "\n" " Get maximum number of vertex array indices.\n" "\n" " :return: Number of indices.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [6/20]

PyDoc_STRVAR ( pygpu_max_batch_vertices_get_doc ,
".. function:: max_batch_vertices_get()\n" "\n" " Get maximum number of vertex array vertices.\n" "\n" " :return: Number of vertices.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [7/20]

PyDoc_STRVAR ( pygpu_max_images_get_doc ,
".. function:: max_images_get()\n" "\n" " Get maximum supported number of image units.\n" "\n" " :return: Number of image units.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [8/20]

PyDoc_STRVAR ( pygpu_max_texture_layers_get_doc ,
".. function:: max_texture_layers_get()\n" "\n" " Get maximum number of layers in texture.\n" "\n" " :return: Number of layers.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [9/20]

PyDoc_STRVAR ( pygpu_max_texture_size_get_doc ,
".. function:: max_texture_size_get()\n" "\n" " Get estimated maximum texture size to be able to handle.\n" "\n" " :return: Texture size.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [10/20]

PyDoc_STRVAR ( pygpu_max_textures_frag_get_doc ,
".. function:: max_textures_frag_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the fragment shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [11/20]

PyDoc_STRVAR ( pygpu_max_textures_geom_get_doc ,
".. function:: max_textures_geom_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the geometry shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [12/20]

PyDoc_STRVAR ( pygpu_max_textures_get_doc ,
".. function:: max_textures_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the vertex shader and the\n" " fragment processor.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [13/20]

PyDoc_STRVAR ( pygpu_max_textures_vert_get_doc ,
".. function:: max_textures_vert_get()\n" "\n" " Get maximum supported texture image units used for\n" " accessing texture maps from the vertex shader.\n" "\n" " :return: Texture image units.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [14/20]

PyDoc_STRVAR ( pygpu_max_uniforms_frag_get_doc ,
".. function:: max_uniforms_frag_get()\n" "\n" " Get maximum number of values held in uniform variable\n" " storage for a fragment shader.\n" "\n" " :return: Number of values.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [15/20]

PyDoc_STRVAR ( pygpu_max_uniforms_vert_get_doc ,
".. function:: max_uniforms_vert_get()\n" "\n" " Get maximum number of values held in uniform variable\n" " storage for a vertex shader.\n" "\n" " :return: Number of values.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [16/20]

PyDoc_STRVAR ( pygpu_max_varying_floats_get_doc ,
".. function:: max_varying_floats_get()\n" "\n" " Get maximum number of varying variables used by\n" " vertex and fragment shaders.\n" "\n" " :return: Number of variables.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [17/20]

PyDoc_STRVAR ( pygpu_max_vertex_attribs_get_doc ,
".. function:: max_vertex_attribs_get()\n" "\n" " Get maximum number of vertex attributes accessible to\n" " a vertex shader.\n" "\n" " :return: Number of attributes.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [18/20]

PyDoc_STRVAR ( pygpu_max_work_group_count_get_doc ,
".. function:: max_work_group_count_get(index)\n" "\n" " Get maximum number of work groups that may be dispatched to a compute shader.\n" "\n" " :arg index: Index of the dimension.\n" " :type index: int\n" " :return: Maximum number of work groups for the queried dimension.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [19/20]

PyDoc_STRVAR ( pygpu_max_work_group_size_get_doc ,
".. function:: max_work_group_size_get(index)\n" "\n" " Get maximum size of a work group that may be dispatched to a compute shader.\n" "\n" " :arg index: Index of the dimension.\n" " :type index: int\n" " :return: Maximum size of a work group for the queried dimension.\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [20/20]

PyDoc_STRVAR ( pygpu_shader_image_load_store_support_get_doc ,
".. function:: shader_image_load_store_support_get()\n" "\n" " Is image load/store supported.\n" "\n" " :return: True when supported,
False when not supported.\n" " :rtype:bool\n"  )

◆ pygpu_compute_shader_support_get()

static PyObject * pygpu_compute_shader_support_get ( PyObject * )
static

Definition at line 274 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ.

◆ pygpu_extensions_get()

static PyObject * pygpu_extensions_get ( PyObject * )
static

◆ pygpu_hdr_support_get()

static PyObject * pygpu_hdr_support_get ( PyObject * )
static

Definition at line 325 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_hdr_support().

◆ pygpu_max_batch_indices_get()

static PyObject * pygpu_max_batch_indices_get ( PyObject * )
static

Definition at line 185 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_batch_indices().

◆ pygpu_max_batch_vertices_get()

static PyObject * pygpu_max_batch_vertices_get ( PyObject * )
static

◆ pygpu_max_images_get()

static PyObject * pygpu_max_images_get ( PyObject * )
static

Definition at line 135 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_images().

◆ pygpu_max_texture_layers_get()

static PyObject * pygpu_max_texture_layers_get ( PyObject * )
static

Definition at line 50 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_texture_layers().

◆ pygpu_max_texture_size_get()

static PyObject * pygpu_max_texture_size_get ( PyObject * )
static

Definition at line 34 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_texture_size().

◆ pygpu_max_textures_frag_get()

static PyObject * pygpu_max_textures_frag_get ( PyObject * )
static

Definition at line 119 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_textures_frag().

◆ pygpu_max_textures_geom_get()

static PyObject * pygpu_max_textures_geom_get ( PyObject * )
static

Definition at line 102 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_textures_geom().

◆ pygpu_max_textures_get()

static PyObject * pygpu_max_textures_get ( PyObject * )
static

Definition at line 68 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_textures().

◆ pygpu_max_textures_vert_get()

static PyObject * pygpu_max_textures_vert_get ( PyObject * )
static

Definition at line 85 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_textures_vert().

◆ pygpu_max_uniforms_frag_get()

static PyObject * pygpu_max_uniforms_frag_get ( PyObject * )
static

Definition at line 169 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_uniforms_frag().

◆ pygpu_max_uniforms_vert_get()

static PyObject * pygpu_max_uniforms_vert_get ( PyObject * )
static

Definition at line 152 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ, and GPU_max_uniforms_vert().

◆ pygpu_max_varying_floats_get()

static PyObject * pygpu_max_varying_floats_get ( PyObject * )
static

◆ pygpu_max_vertex_attribs_get()

static PyObject * pygpu_max_vertex_attribs_get ( PyObject * )
static

◆ pygpu_max_work_group_count_get()

static PyObject * pygpu_max_work_group_count_get ( PyObject * ,
PyObject * args )
static

◆ pygpu_max_work_group_size_get()

static PyObject * pygpu_max_work_group_size_get ( PyObject * ,
PyObject * args )
static

◆ pygpu_shader_image_load_store_support_get()

static PyObject * pygpu_shader_image_load_store_support_get ( PyObject * )
static

Definition at line 299 of file gpu_py_capabilities.cc.

References BPYGPU_IS_INIT_OR_ERROR_OBJ.

Variable Documentation

◆ pygpu_capabilities__tp_methods

PyMethodDef pygpu_capabilities__tp_methods[]
static

Definition at line 393 of file gpu_py_capabilities.cc.

◆ pygpu_capabilities_module_def

PyModuleDef pygpu_capabilities_module_def
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"gpu.capabilities",
pygpu_capabilities__tp_doc,
0,
nullptr,
nullptr,
nullptr,
nullptr,
}
static PyMethodDef pygpu_capabilities__tp_methods[]

Definition at line 480 of file gpu_py_capabilities.cc.

Referenced by bpygpu_capabilities_init().