Skip to content

Commit

Permalink
Make the renderd_node search code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
bsolos committed Mar 7, 2023
1 parent 9a1b0b6 commit db335d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/amdgpu_libdrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ static int libdrm_initialize() {

char *renderd_node = nullptr;
for (int i = 0; i < device_count; i++) {
if ((devices[i]->available_nodes & 0b101) != 0b101) {
constexpr int required_nodes = (1 << DRM_NODE_PRIMARY) | (1 << DRM_NODE_RENDER);
if ((devices[i]->available_nodes & required_nodes) != required_nodes) {
continue;
}

Expand Down

0 comments on commit db335d6

Please sign in to comment.