Blender  V3.3
gpu_py_uniformbuffer.c File Reference
#include <Python.h>
#include "BLI_string.h"
#include "GPU_context.h"
#include "GPU_uniform_buffer.h"
#include "../generic/py_capi_utils.h"
#include "gpu_py.h"
#include "gpu_py_uniformbuffer.h"

Go to the source code of this file.

Functions

Public API
PyObject * BPyGPUUniformBuf_CreatePyObject (GPUUniformBuf *ubo)
 

GPUUniformBuf Common Utilities

#define BPYGPU_UNIFORMBUF_CHECK_OBJ(bpygpu)
 
static int pygpu_uniformbuffer_valid_check (BPyGPUUniformBuf *bpygpu_ub)
 

GPUUniformBuf Type

static PyGetSetDef pygpu_uniformbuffer__tp_getseters []
 
static struct PyMethodDef pygpu_uniformbuffer__tp_methods []
 
PyTypeObject BPyGPUUniformBuf_Type
 
static PyObject * pygpu_uniformbuffer__tp_new (PyTypeObject *UNUSED(self), PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (pygpu_uniformbuffer_update_doc, ".. method:: update(data)\n" "\n" " Update the data of the uniform buffer object.\n")
 
static PyObject * pygpu_uniformbuffer_update (BPyGPUUniformBuf *self, PyObject *obj)
 
static void BPyGPUUniformBuf__tp_dealloc (BPyGPUUniformBuf *self)
 
 PyDoc_STRVAR (pygpu_uniformbuffer__tp_doc, ".. class:: GPUUniformBuf(data)\n" "\n" " This object gives access to off uniform buffers.\n" "\n" " :arg data: Data to fill the buffer.\n" " :type data: object exposing buffer interface\n")
 

Detailed Description

This file defines the uniform buffer functionalities of the 'gpu' module

Definition in file gpu_py_uniformbuffer.c.

Macro Definition Documentation

◆ BPYGPU_UNIFORMBUF_CHECK_OBJ

#define BPYGPU_UNIFORMBUF_CHECK_OBJ (   bpygpu)
Value:
{ \
if (UNLIKELY(pygpu_uniformbuffer_valid_check(bpygpu) == -1)) { \
return NULL; \
} \
} \
((void)0)
#define UNLIKELY(x)
SyclQueue void void size_t num_bytes void
static int pygpu_uniformbuffer_valid_check(BPyGPUUniformBuf *bpygpu_ub)

Definition at line 44 of file gpu_py_uniformbuffer.c.

Function Documentation

◆ BPyGPUUniformBuf__tp_dealloc()

static void BPyGPUUniformBuf__tp_dealloc ( BPyGPUUniformBuf self)
static

Definition at line 141 of file gpu_py_uniformbuffer.c.

References GPU_uniformbuf_free(), and self.

◆ BPyGPUUniformBuf_CreatePyObject()

PyObject* BPyGPUUniformBuf_CreatePyObject ( GPUUniformBuf ubo)

Definition at line 185 of file gpu_py_uniformbuffer.c.

References BPyGPUUniformBuf_Type.

Referenced by pygpu_uniformbuffer__tp_new().

◆ PyDoc_STRVAR() [1/2]

PyDoc_STRVAR ( pygpu_uniformbuffer__tp_doc  ,
".. class:: GPUUniformBuf(data)\n" "\n" " This object gives access to off uniform buffers.\n" "\n" " :arg data: Data to fill the buffer.\n" " :type data: object exposing buffer interface\n"   
)

◆ PyDoc_STRVAR() [2/2]

PyDoc_STRVAR ( pygpu_uniformbuffer_update_doc  ,
".. method:: update(data)\n" "\n" " Update the data of the uniform buffer object.\n"   
)

◆ pygpu_uniformbuffer__tp_new()

static PyObject* pygpu_uniformbuffer__tp_new ( PyTypeObject *  UNUSEDself,
PyObject *  args,
PyObject *  kwds 
)
static

◆ pygpu_uniformbuffer_update()

static PyObject* pygpu_uniformbuffer_update ( BPyGPUUniformBuf self,
PyObject *  obj 
)
static

◆ pygpu_uniformbuffer_valid_check()

static int pygpu_uniformbuffer_valid_check ( BPyGPUUniformBuf bpygpu_ub)
static

Variable Documentation

◆ BPyGPUUniformBuf_Type

PyTypeObject BPyGPUUniformBuf_Type
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUUniformBuf",
.tp_basicsize = sizeof(BPyGPUUniformBuf),
.tp_dealloc = (destructor)BPyGPUUniformBuf__tp_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_doc = pygpu_uniformbuffer__tp_doc,
}
static PyGetSetDef pygpu_uniformbuffer__tp_getseters[]
static PyObject * pygpu_uniformbuffer__tp_new(PyTypeObject *UNUSED(self), PyObject *args, PyObject *kwds)
static void BPyGPUUniformBuf__tp_dealloc(BPyGPUUniformBuf *self)
static struct PyMethodDef pygpu_uniformbuffer__tp_methods[]
struct BPyGPUUniformBuf BPyGPUUniformBuf

Definition at line 168 of file gpu_py_uniformbuffer.c.

Referenced by bpygpu_types_init(), BPyGPUUniformBuf_CreatePyObject(), and pygpu_shader_uniform_block().

◆ pygpu_uniformbuffer__tp_getseters

PyGetSetDef pygpu_uniformbuffer__tp_getseters[]
static
Initial value:
= {
}

Definition at line 149 of file gpu_py_uniformbuffer.c.

◆ pygpu_uniformbuffer__tp_methods

struct PyMethodDef pygpu_uniformbuffer__tp_methods[]
static
Initial value:
= {
{"update", (PyCFunction)pygpu_uniformbuffer_update, METH_O, pygpu_uniformbuffer_update_doc},
{NULL, NULL, 0, NULL},
}
static PyObject * pygpu_uniformbuffer_update(BPyGPUUniformBuf *self, PyObject *obj)

Definition at line 149 of file gpu_py_uniformbuffer.c.