[Bf-blender-cvs] [59f5d10d73f] temp-viewport-compositor-merge: Merge branch 'master' into temp-viewport-compositor-merge
Omar Emara
noreply at git.blender.org
Wed Jun 15 11:51:34 CEST 2022
Commit: 59f5d10d73f6d5730ceb17161eb04b1854ff98fc
Author: Omar Emara
Date: Tue Jun 14 09:01:36 2022 +0200
Branches: temp-viewport-compositor-merge
https://developer.blender.org/rB59f5d10d73f6d5730ceb17161eb04b1854ff98fc
Merge branch 'master' into temp-viewport-compositor-merge
===================================================================
===================================================================
diff --cc source/blender/gpu/intern/gpu_node_graph.c
index 1b76d6a2d70,3c6a03c56d3..94cfe90e0a5
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@@ -471,18 -466,9 +471,18 @@@ static GPUMaterialTexture *gpu_node_gra
return tex;
}
+static GPUMaterialImage *gpu_node_graph_add_image(GPUNodeGraph *graph, eGPUTextureFormat format)
+{
+ GPUMaterialImage *image = MEM_callocN(sizeof(GPUMaterialImage), __func__);
+ image->format = format;
+ const int images_count = BLI_listbase_count(&graph->images);
+ BLI_snprintf(image->name_in_shader, sizeof(image->name_in_shader), "image%d", images_count);
+ BLI_addtail(&graph->images, image);
+ return image;
+}
/* Creating Inputs */
- GPUNodeLink *GPU_attribute(GPUMaterial *mat, const CustomDataType type, const char *name)
+ GPUNodeLink *GPU_attribute(GPUMaterial *mat, const eCustomDataType type, const char *name)
{
GPUNodeGraph *graph = gpu_material_node_graph(mat);
GPUMaterialAttribute *attr = gpu_node_graph_add_attribute(graph, type, name);
More information about the Bf-blender-cvs
mailing list