27 pygpu_max_texture_size_get_doc,
28 ".. function:: max_texture_size_get()\n"
30 " Get estimated maximum texture size to be able to handle.\n"
32 " :return: Texture size.\n"
43 pygpu_max_texture_layers_get_doc,
44 ".. function:: max_texture_layers_get()\n"
46 " Get maximum number of layers in texture.\n"
48 " :return: Number of layers.\n"
59 pygpu_max_textures_get_doc,
60 ".. function:: max_textures_get()\n"
62 " Get maximum supported texture image units used for\n"
63 " accessing texture maps from the vertex shader and the\n"
64 " fragment processor.\n"
66 " :return: Texture image units.\n"
77 pygpu_max_textures_vert_get_doc,
78 ".. function:: max_textures_vert_get()\n"
80 " Get maximum supported texture image units used for\n"
81 " accessing texture maps from the vertex shader.\n"
83 " :return: Texture image units.\n"
94 pygpu_max_textures_geom_get_doc,
95 ".. function:: max_textures_geom_get()\n"
97 " Get maximum supported texture image units used for\n"
98 " accessing texture maps from the geometry shader.\n"
100 " :return: Texture image units.\n"
111 pygpu_max_textures_frag_get_doc,
112 ".. function:: max_textures_frag_get()\n"
114 " Get maximum supported texture image units used for\n"
115 " accessing texture maps from the fragment shader.\n"
117 " :return: Texture image units.\n"
128 pygpu_max_images_get_doc,
129 ".. function:: max_images_get()\n"
131 " Get maximum supported number of image units.\n"
133 " :return: Number of image units.\n"
144 pygpu_max_uniforms_vert_get_doc,
145 ".. function:: max_uniforms_vert_get()\n"
147 " Get maximum number of values held in uniform variable\n"
148 " storage for a vertex shader.\n"
150 " :return: Number of values.\n"
161 pygpu_max_uniforms_frag_get_doc,
162 ".. function:: max_uniforms_frag_get()\n"
164 " Get maximum number of values held in uniform variable\n"
165 " storage for a fragment shader.\n"
167 " :return: Number of values.\n"
178 pygpu_max_batch_indices_get_doc,
179 ".. function:: max_batch_indices_get()\n"
181 " Get maximum number of vertex array indices.\n"
183 " :return: Number of indices.\n"
194 pygpu_max_batch_vertices_get_doc,
195 ".. function:: max_batch_vertices_get()\n"
197 " Get maximum number of vertex array vertices.\n"
199 " :return: Number of vertices.\n"
210 pygpu_max_vertex_attribs_get_doc,
211 ".. function:: max_vertex_attribs_get()\n"
213 " Get maximum number of vertex attributes accessible to\n"
214 " a vertex shader.\n"
216 " :return: Number of attributes.\n"
227 pygpu_max_varying_floats_get_doc,
228 ".. function:: max_varying_floats_get()\n"
230 " Get maximum number of varying variables used by\n"
231 " vertex and fragment shaders.\n"
233 " :return: Number of variables.\n"
244 pygpu_extensions_get_doc,
245 ".. function:: extensions_get()\n"
247 " Get supported extensions in the current context.\n"
249 " :return: Extensions.\n"
250 " :rtype: tuple[str, ...]\n");
256 PyObject *
ret = PyTuple_New(extensions_len);
257 PyObject **ob_items = (
reinterpret_cast<PyTupleObject *
>(
ret))->ob_item;
258 for (
int i = 0; i < extensions_len; i++) {
267 pygpu_compute_shader_support_get_doc,
268 ".. function:: compute_shader_support_get()\n"
270 " Are compute shaders supported.\n"
272 " :return: True when supported, False when not supported.\n"
278 static bool deprecation_warning_issued =
false;
279 if (!deprecation_warning_issued) {
280 PyErr_WarnEx(PyExc_DeprecationWarning,
281 "compute_shader_support_get is deprecated. All platforms have support for "
284 deprecation_warning_issued =
true;
287 return PyBool_FromLong(
true);
292 pygpu_shader_image_load_store_support_get_doc,
293 ".. function:: shader_image_load_store_support_get()\n"
295 " Is image load/store supported.\n"
297 " :return: True when supported, False when not supported.\n"
303 static bool deprecation_warning_issued =
false;
304 if (!deprecation_warning_issued) {
306 PyExc_DeprecationWarning,
307 "shader_image_load_store_support_get is deprecated. All platforms have support for "
310 deprecation_warning_issued =
true;
313 return PyBool_FromLong(
true);
318 pygpu_hdr_support_get_doc,
319 ".. function:: hdr_support_get()\n"
321 " Return whether GPU backend supports High Dynamic range for viewport.\n"
323 " :return: HDR support available.\n"
334 pygpu_max_work_group_count_get_doc,
335 ".. function:: max_work_group_count_get(index)\n"
337 " Get maximum number of work groups that may be dispatched to a compute shader.\n"
339 " :param index: Index of the dimension.\n"
340 " :type index: int\n"
341 " :return: Maximum number of work groups for the queried dimension.\n"
348 if (!PyArg_ParseTuple(args,
350 ":max_work_group_count_get",
358 return PyLong_FromLong(max_work_group_count);
363 pygpu_max_work_group_size_get_doc,
364 ".. function:: max_work_group_size_get(index)\n"
366 " Get maximum size of a work group that may be dispatched to a compute shader.\n"
368 " :param index: Index of the dimension.\n"
369 " :type index: int\n"
370 " :return: Maximum size of a work group for the queried dimension.\n"
377 if (!PyArg_ParseTuple(args,
379 ":max_work_group_size_get",
387 return PyLong_FromLong(max_work_group_size);
392 pygpu_ray_query_support_get_doc,
393 ".. function:: ray_query_support_get()\n"
395 " Return whether GPU and the current backend supports Ray Queries (Hardware Raytracing).\n"
397 " :return: ray_query support available.\n"
414# pragma clang diagnostic push
415# pragma clang diagnostic ignored "-Wcast-function-type"
417# pragma GCC diagnostic push
418# pragma GCC diagnostic ignored "-Wcast-function-type"
423 {
"max_texture_size_get",
426 pygpu_max_texture_size_get_doc},
427 {
"max_texture_layers_get",
430 pygpu_max_texture_layers_get_doc},
434 pygpu_max_textures_get_doc},
435 {
"max_textures_vert_get",
438 pygpu_max_textures_vert_get_doc},
439 {
"max_textures_geom_get",
442 pygpu_max_textures_geom_get_doc},
443 {
"max_textures_frag_get",
446 pygpu_max_textures_frag_get_doc},
450 pygpu_max_images_get_doc},
451 {
"max_uniforms_vert_get",
454 pygpu_max_uniforms_vert_get_doc},
455 {
"max_uniforms_frag_get",
458 pygpu_max_uniforms_frag_get_doc},
459 {
"max_batch_indices_get",
462 pygpu_max_batch_indices_get_doc},
463 {
"max_batch_vertices_get",
466 pygpu_max_batch_vertices_get_doc},
467 {
"max_vertex_attribs_get",
470 pygpu_max_vertex_attribs_get_doc},
471 {
"max_varying_floats_get",
474 pygpu_max_varying_floats_get_doc},
478 pygpu_extensions_get_doc},
480 {
"compute_shader_support_get",
483 pygpu_compute_shader_support_get_doc},
484 {
"shader_image_load_store_support_get",
487 pygpu_shader_image_load_store_support_get_doc},
491 pygpu_hdr_support_get_doc},
493 "max_work_group_count_get",
496 pygpu_max_work_group_count_get_doc,
499 "max_work_group_size_get",
502 pygpu_max_work_group_size_get_doc,
504 {
"ray_query_support_get",
507 pygpu_ray_query_support_get_doc},
508 {
nullptr,
nullptr, 0,
nullptr},
513# pragma clang diagnostic pop
515# pragma GCC diagnostic pop
521 pygpu_capabilities__tp_doc,
522 "This module provides access to the GPU capabilities.");
526 pygpu_capabilities__tp_doc,
#define BPYGPU_IS_INIT_OR_ERROR_OBJ
static PyObject * pygpu_hdr_support_get(PyObject *)
const char * GPU_extension_get(int i)
static PyObject * pygpu_shader_image_load_store_support_get(PyObject *)
PyObject * bpygpu_capabilities_init()
static PyObject * pygpu_max_textures_geom_get(PyObject *)
PyDoc_STRVAR(bpy_bm_new_doc, ".. function:: new(*, use_operators=True)\n" "\n" " :param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " "extra memory per vert/edge/face).\n" " :type use_operators: bool\n" " :return: Return a new, empty BMesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
static PyObject * pygpu_max_images_get(PyObject *)
int GPU_max_varying_floats()
static PyObject * pygpu_max_textures_vert_get(PyObject *)
bool GPU_ray_query_support()
static PyModuleDef pygpu_capabilities_module_def
int GPU_max_texture_size()
int GPU_max_vertex_attribs()
static PyObject * pygpu_max_varying_floats_get(PyObject *)
int GPU_max_batch_indices()
static PyObject * pygpu_ray_query_support_get(PyObject *)
int GPU_max_work_group_count(int index)
static PyObject * pygpu_max_work_group_size_get(PyObject *, PyObject *args)
static PyObject * pygpu_max_textures_frag_get(PyObject *)
int GPU_max_batch_vertices()
int GPU_max_uniforms_frag()
int GPU_max_texture_layers()
int GPU_max_work_group_size(int index)
static PyObject * pygpu_max_textures_get(PyObject *)
static PyObject * pygpu_max_work_group_count_get(PyObject *, PyObject *args)
static PyObject * pygpu_compute_shader_support_get(PyObject *)
static PyObject * pygpu_max_texture_size_get(PyObject *)
static PyObject * pygpu_max_uniforms_frag_get(PyObject *)
static PyObject * pygpu_extensions_get(PyObject *)
static PyObject * pygpu_max_batch_indices_get(PyObject *)
int GPU_max_uniforms_vert()
static PyObject * pygpu_max_texture_layers_get(PyObject *)
static PyObject * pygpu_max_uniforms_vert_get(PyObject *)
static PyObject * pygpu_max_vertex_attribs_get(PyObject *)
static PyMethodDef pygpu_capabilities__tp_methods[]
static PyObject * pygpu_max_batch_vertices_get(PyObject *)