Fix #137052: GPU: Crash on startup caused by legacy pyGPU API

The removed legacy API was still in used by the pyGPU API.
Add a deprecation warning instead.

This partially reverts commit 3179cb0069.
This commit is contained in:
Clément Foucault
2025-04-07 12:09:35 +02:00
parent 24faa4d856
commit 9d06508837
4 changed files with 243 additions and 2 deletions

View File

@@ -109,6 +109,11 @@ static PyObject *pygpu_shader__tp_new(PyTypeObject * /*type*/, PyObject *args, P
{
BPYGPU_IS_INIT_OR_ERROR_OBJ;
PyErr_WarnEx(PyExc_DeprecationWarning,
"Direct shader creation is deprecated. "
"Use gpu.shader.create_from_info(shader_info) instead.",
1);
struct {
const char *vertexcode;
const char *fragcode;