diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-11-07 18:12:16 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-11-07 18:12:16 +0300 |
commit | 410b87ca781d6b6b061bab0440005ac1ab82688f (patch) | |
tree | 185338c288c87828322ac3bd31355abd5290e737 /source/blender/python/gpu | |
parent | 2b9994257fbc9ef486165c6d0c5815f40f890124 (diff) | |
parent | 95631c94c4bd08f8a7e9c713f624e934eb7eb7ae (diff) |
Merge branch 'master' into temp-gpencil-automask
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r-- | source/blender/python/gpu/gpu_py_buffer.c | 30 | ||||
-rw-r--r-- | source/blender/python/gpu/gpu_py_platform.c | 4 |
2 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/python/gpu/gpu_py_buffer.c b/source/blender/python/gpu/gpu_py_buffer.c index 30a434f8667..3dc141f400d 100644 --- a/source/blender/python/gpu/gpu_py_buffer.c +++ b/source/blender/python/gpu/gpu_py_buffer.c @@ -579,22 +579,22 @@ static PyGetSetDef pygpu_buffer_getseters[] = { }; static PySequenceMethods pygpu_buffer__tp_as_sequence = { - (lenfunc)pygpu_buffer__sq_length, /* sq_length */ - (binaryfunc)NULL, /* sq_concat */ - (ssizeargfunc)NULL, /* sq_repeat */ - (ssizeargfunc)pygpu_buffer__sq_item, /* sq_item */ - (ssizessizeargfunc)NULL, /* sq_slice, deprecated, handled in pygpu_buffer__sq_item */ - (ssizeobjargproc)pygpu_buffer__sq_ass_item, /* sq_ass_item */ - (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated handled in pygpu_buffer__sq_ass_item */ - (objobjproc)NULL, /* sq_contains */ - (binaryfunc)NULL, /* sq_inplace_concat */ - (ssizeargfunc)NULL, /* sq_inplace_repeat */ + /*sq_length*/ (lenfunc)pygpu_buffer__sq_length, + /*sq_concat*/ NULL, + /*sq_repeat*/ NULL, + /*sq_item*/ (ssizeargfunc)pygpu_buffer__sq_item, + /*was_sq_slice*/ NULL, /* DEPRECATED. Handled by #pygpu_buffer__sq_item. */ + /*sq_ass_item*/ (ssizeobjargproc)pygpu_buffer__sq_ass_item, + /*was_sq_ass_slice*/ NULL, /* DEPRECATED. Handled by #pygpu_buffer__sq_ass_item. */ + /*sq_contains*/ NULL, + /*sq_inplace_concat*/ NULL, + /*sq_inplace_repeat*/ NULL, }; static PyMappingMethods pygpu_buffer__tp_as_mapping = { - (lenfunc)pygpu_buffer__sq_length, - (binaryfunc)pygpu_buffer__mp_subscript, - (objobjargproc)pygpu_buffer__mp_ass_subscript, + /*mp_len*/ (lenfunc)pygpu_buffer__sq_length, + /*mp_subscript*/ (binaryfunc)pygpu_buffer__mp_subscript, + /*mp_ass_subscript*/ (objobjargproc)pygpu_buffer__mp_ass_subscript, }; #ifdef PYGPU_BUFFER_PROTOCOL @@ -648,8 +648,8 @@ static void pygpu_buffer__bf_releasebuffer(PyObject *UNUSED(exporter), Py_buffer } static PyBufferProcs pygpu_buffer__tp_as_buffer = { - (getbufferproc)pygpu_buffer__bf_getbuffer, - (releasebufferproc)pygpu_buffer__bf_releasebuffer, + /*bf_getbuffer*/ (getbufferproc)pygpu_buffer__bf_getbuffer, + /*bf_releasebuffer*/ (releasebufferproc)pygpu_buffer__bf_releasebuffer, }; #endif diff --git a/source/blender/python/gpu/gpu_py_platform.c b/source/blender/python/gpu/gpu_py_platform.c index 51366d199b0..c6e964405fa 100644 --- a/source/blender/python/gpu/gpu_py_platform.c +++ b/source/blender/python/gpu/gpu_py_platform.c @@ -89,11 +89,13 @@ PyDoc_STRVAR(pygpu_platform_backend_type_get_doc, "\n" " Get actuve GPU backend.\n" "\n" - " :return: Backend type ('OPENGL', 'METAL', 'NONE', 'UNKNOWN').\n" + " :return: Backend type ('OPENGL', 'VULKAN', 'METAL', 'NONE', 'UNKNOWN').\n" " :rtype: str\n"); static PyObject *pygpu_platform_backend_type_get(PyObject *UNUSED(self)) { switch (GPU_backend_get_type()) { + case GPU_BACKEND_VULKAN: + return PyUnicode_FromString("VULKAN"); case GPU_BACKEND_METAL: return PyUnicode_FromString("METAL"); case GPU_BACKEND_NONE: |