From b7b74385cdb11b0068805f5e7c2850510cd06ca9 Mon Sep 17 00:00:00 2001 From: bsavery Date: Tue, 31 Oct 2023 17:54:03 +0100 Subject: [PATCH 1/2] Cycles: update Linux library search paths for upcoming ROCm 6 Pull Request: https://projects.blender.org/blender/blender/pulls/114178 --- extern/hipew/src/hipew.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c index 3b607e5daaa..4927f86b804 100644 --- a/extern/hipew/src/hipew.c +++ b/extern/hipew/src/hipew.c @@ -238,9 +238,13 @@ static int hipewHipInit(void) { /* Default installation path. */ const char *hip_paths[] = {"", NULL}; #else + /* ROCm 6 changes paths from /opt/rocm/hip/lib to /opt/rocm/lib, so + * search for libraries there. It still includes .so.5. */ const char *hip_paths[] = {"libamdhip64.so.5", + "/opt/rocm/lib/libamdhip64.so.5", "/opt/rocm/hip/lib/libamdhip64.so.5", "libamdhip64.so", + "/opt/rocm/lib/libamdhip64.so", "/opt/rocm/hip/lib/libamdhip64.so", NULL}; #endif static int initialized = 0; From d6be6339f13cf2059916316f8210743e552bf67f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 31 Oct 2023 18:17:26 +0100 Subject: [PATCH 2/2] Fix: Incorrect PBVH mask drawing after recent change The `COMPONENT_LEN_SCALAR` workaround isn't used for masks which are drawn in a more hard-coded way. --- source/blender/draw/intern/draw_pbvh.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index ebbc3b1e765..42ff9cc3df9 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -762,7 +762,22 @@ struct PBVHBatches { if (const float *mask = static_cast( CustomData_get_layer(args.vert_data, CD_PAINT_MASK))) { - extract_data_vert_faces(args, {mask, args.me->totvert}, vert_buf); + const Span corner_verts = args.corner_verts; + const Span looptris = args.mlooptri; + const Span looptri_faces = args.looptri_faces; + const bool *hide_poly = args.hide_poly; + + float *data = static_cast(GPU_vertbuf_get_data(&vert_buf)); + for (const int looptri_i : args.prim_indices) { + if (hide_poly && hide_poly[looptri_faces[looptri_i]]) { + continue; + } + for (int i : IndexRange(3)) { + const int vert = corner_verts[looptris[looptri_i].tri[i]]; + *data = mask[vert]; + data++; + } + } } else { MutableSpan(static_cast(GPU_vertbuf_get_data(vbo.vert_buf)), totvert).fill(0);