Skip to content

Commit 6247923

Browse files
gulafaranvaxerski
authored andcommitted
renderer: drop the mods.empty() check
what if the driver did return modifiers that isnt linear, this wont be added because of the .empty check.
1 parent 79b515f commit 6247923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/drm/Renderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ std::optional<std::vector<std::pair<uint64_t, bool>>> CDRMRenderer::getModsForFo
307307
}
308308

309309
// if the driver doesn't mark linear as external, add it. It's allowed unless the driver says otherwise. (e.g. nvidia)
310-
if (!linearIsExternal && std::ranges::find(mods, DRM_FORMAT_MOD_LINEAR) == mods.end() && mods.empty())
310+
if (!linearIsExternal && std::ranges::find(mods, DRM_FORMAT_MOD_LINEAR) == mods.end())
311311
result.emplace_back(DRM_FORMAT_MOD_LINEAR, true);
312312

313313
return result;

0 commit comments

Comments
 (0)