[Bf-blender-cvs] [b3e0eadbdc0] blender-v3.3-release: GPU: Fix using FLOAT_2D_ARRAY and FLOAT_3D textures via Python.

Jeroen Bakker noreply at git.blender.org
Thu Jan 12 15:31:55 CET 2023


Commit: b3e0eadbdc0ae68b2384783bb9f36916ec601efa
Author: Jeroen Bakker
Date:   Tue Dec 6 20:16:39 2022 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rBb3e0eadbdc0ae68b2384783bb9f36916ec601efa

GPU: Fix using FLOAT_2D_ARRAY and FLOAT_3D textures via Python.

Translation from python enum values were incorrect and textures created
in python using those types would result in faulty textures. In
renderdoc those textures would not bind.

===================================================================

M	source/blender/python/gpu/gpu_py_shader_create_info.cc

===================================================================

diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc
index e00d01174f4..c51c9173bdc 100644
--- a/source/blender/python/gpu/gpu_py_shader_create_info.cc
+++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc
@@ -115,8 +115,8 @@ static const struct PyC_StringEnumItems pygpu_imagetype_items[] = {
     {(int)ImageType::FLOAT_1D, "FLOAT_1D"},
     {(int)ImageType::FLOAT_1D_ARRAY, "FLOAT_1D_ARRAY"},
     {(int)ImageType::FLOAT_2D, "FLOAT_2D"},
-    {(int)ImageType::FLOAT_2D_ARRAY, "FLOAT"},
-    {(int)ImageType::FLOAT_3D, "FLOAT_2D_ARRAY"},
+    {(int)ImageType::FLOAT_2D_ARRAY, "FLOAT_2D_ARRAY"},
+    {(int)ImageType::FLOAT_3D, "FLOAT_3D"},
     {(int)ImageType::FLOAT_CUBE, "FLOAT_CUBE"},
     {(int)ImageType::FLOAT_CUBE_ARRAY, "FLOAT_CUBE_ARRAY"},
     {(int)ImageType::INT_BUFFER, "INT_BUFFER"},



More information about the Bf-blender-cvs mailing list