venus: disable TLS ring prio forwarding on Windows
The prios aren't consistent when guest and host are different OS'es. Even if they are the same, sometimes the forwarding can hit other permission issues. The entire ring prio thing has to be redesigned, and before that we just disable it on Windows. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
|
||||
#include "vn_ring.h"
|
||||
|
||||
#if !DETECT_OS_WINDOWS
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "venus-protocol/vn_protocol_driver_transport.h"
|
||||
|
||||
@@ -330,11 +332,13 @@ vn_ring_create(struct vn_instance *instance,
|
||||
* VK_MESA_VENUS_PROTOCOL_SPEC_VERSION >= 2 */
|
||||
int prio = 0;
|
||||
bool ring_priority = false;
|
||||
#if !DETECT_OS_WINDOWS
|
||||
if (instance->renderer->info.vk_mesa_venus_protocol_spec_version >= 2) {
|
||||
errno = 0;
|
||||
prio = getpriority(PRIO_PROCESS, 0);
|
||||
ring_priority = is_tls_ring && !(prio == -1 && errno);
|
||||
}
|
||||
#endif /* !DETECT_OS_WINDOWS */
|
||||
const struct VkRingPriorityInfoMESA priority_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_RING_PRIORITY_INFO_MESA,
|
||||
.priority = prio,
|
||||
|
||||
Reference in New Issue
Block a user