GPU: Remove wrapper type for gpu::UniformBuf

This is the first step into merging `DRW_gpu_wrapper.hh` into
the GPU module.

This is very similar to #119825.

Pull Request: https://projects.blender.org/blender/blender/pulls/144328
This commit is contained in:
Clément Foucault
2025-08-11 09:46:45 +02:00
committed by Clément Foucault
parent 1388a70914
commit 9fbf7e9ec2
29 changed files with 123 additions and 128 deletions

View File

@@ -24,7 +24,7 @@
#include "gpu_py_uniformbuffer.hh" /* own include */
/* -------------------------------------------------------------------- */
/** \name GPUUniformBuf Common Utilities
/** \name blender::gpu::UniformBuf Common Utilities
* \{ */
static int pygpu_uniformbuffer_valid_check(BPyGPUUniformBuf *bpygpu_ub)
@@ -53,7 +53,7 @@ static int pygpu_uniformbuffer_valid_check(BPyGPUUniformBuf *bpygpu_ub)
/** \} */
/* -------------------------------------------------------------------- */
/** \name GPUUniformBuf Type
/** \name blender::gpu::UniformBuf Type
* \{ */
static PyObject *pygpu_uniformbuffer__tp_new(PyTypeObject * /*self*/,
@@ -62,7 +62,7 @@ static PyObject *pygpu_uniformbuffer__tp_new(PyTypeObject * /*self*/,
{
BPYGPU_IS_INIT_OR_ERROR_OBJ;
GPUUniformBuf *ubo = nullptr;
blender::gpu::UniformBuf *ubo = nullptr;
PyObject *pybuffer_obj;
char err_out[256] = "unknown error. See console";
@@ -231,7 +231,7 @@ PyTypeObject BPyGPUUniformBuf_Type = {
/** \name Public API
* \{ */
PyObject *BPyGPUUniformBuf_CreatePyObject(GPUUniformBuf *ubo)
PyObject *BPyGPUUniformBuf_CreatePyObject(blender::gpu::UniformBuf *ubo)
{
BPyGPUUniformBuf *self;

View File

@@ -12,7 +12,9 @@
#include "BLI_compiler_attrs.h"
struct GPUUniformBuf;
namespace blender::gpu {
class UniformBuf;
} // namespace blender::gpu
extern PyTypeObject BPyGPUUniformBuf_Type;
@@ -20,7 +22,8 @@ extern PyTypeObject BPyGPUUniformBuf_Type;
struct BPyGPUUniformBuf {
PyObject_HEAD
GPUUniformBuf *ubo;
blender::gpu::UniformBuf *ubo;
};
[[nodiscard]] PyObject *BPyGPUUniformBuf_CreatePyObject(GPUUniformBuf *ubo) ATTR_NONNULL(1);
[[nodiscard]] PyObject *BPyGPUUniformBuf_CreatePyObject(blender::gpu::UniformBuf *ubo)
ATTR_NONNULL(1);