Merge branch 'blender-v3.4-release'
This commit is contained in:
commit
6a96edce2e
|
@ -953,9 +953,9 @@ void GHOST_WindowWayland::setOpaque() const
|
|||
struct wl_region *region;
|
||||
|
||||
/* Make the window opaque. */
|
||||
region = wl_compositor_create_region(system_->compositor());
|
||||
region = wl_compositor_create_region(system_->wl_compositor());
|
||||
wl_region_add(region, 0, 0, UNPACK2(window_->size));
|
||||
wl_surface_set_opaque_region(window_->surface, region);
|
||||
wl_surface_set_opaque_region(window_->wl_surface, region);
|
||||
wl_region_destroy(region);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -620,11 +620,21 @@ void GPUCodegen::generate_graphs()
|
|||
std::stringstream eval_ss;
|
||||
eval_ss << "\n/* Generated Functions */\n\n";
|
||||
LISTBASE_FOREACH (GPUNodeGraphFunctionLink *, func_link, &graph.material_functions) {
|
||||
/* Untag every node in the graph to avoid serializing nodes from other functions */
|
||||
LISTBASE_FOREACH (GPUNode *, node, &graph.nodes) {
|
||||
node->tag &= ~GPU_NODE_TAG_FUNCTION;
|
||||
}
|
||||
/* Tag only the nodes needed for the current function */
|
||||
gpu_nodes_tag(func_link->outlink, GPU_NODE_TAG_FUNCTION);
|
||||
char *fn = graph_serialize(GPU_NODE_TAG_FUNCTION, func_link->outlink);
|
||||
eval_ss << "float " << func_link->name << "() {\n" << fn << "}\n\n";
|
||||
MEM_SAFE_FREE(fn);
|
||||
}
|
||||
output.material_functions = extract_c_str(eval_ss);
|
||||
/* Leave the function tags as they were before serialization */
|
||||
LISTBASE_FOREACH (GPUNodeGraphFunctionLink *, funclink, &graph.material_functions) {
|
||||
gpu_nodes_tag(funclink->outlink, GPU_NODE_TAG_FUNCTION);
|
||||
}
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (GPUMaterialAttribute *, attr, &graph.attributes) {
|
||||
|
|
|
@ -890,7 +890,7 @@ void gpu_node_graph_free(GPUNodeGraph *graph)
|
|||
|
||||
/* Prune Unused Nodes */
|
||||
|
||||
static void gpu_nodes_tag(GPUNodeLink *link, eGPUNodeTag tag)
|
||||
void gpu_nodes_tag(GPUNodeLink *link, eGPUNodeTag tag)
|
||||
{
|
||||
GPUNode *node;
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ typedef struct GPUNodeGraph {
|
|||
|
||||
/* Node Graph */
|
||||
|
||||
void gpu_nodes_tag(GPUNodeLink *link, eGPUNodeTag tag);
|
||||
void gpu_node_graph_prune_unused(GPUNodeGraph *graph);
|
||||
void gpu_node_graph_finalize_uniform_attrs(GPUNodeGraph *graph);
|
||||
|
||||
|
|
Loading…
Reference in New Issue