mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
gbm: improve trace logging around allocs
This commit is contained in:
parent
8079098326
commit
1e43d9a719
1 changed files with 27 additions and 21 deletions
|
@ -73,6 +73,8 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
const auto FORMATS = CURSOR ? swapchain->backendImpl->getCursorFormats() : swapchain->backendImpl->getRenderFormats();
|
const auto FORMATS = CURSOR ? swapchain->backendImpl->getCursorFormats() : swapchain->backendImpl->getRenderFormats();
|
||||||
const auto RENDERABLE = swapchain->backendImpl->getRenderableFormats();
|
const auto RENDERABLE = swapchain->backendImpl->getRenderableFormats();
|
||||||
|
|
||||||
|
TRACE(allocator->backend->log(AQ_LOG_TRACE, std::format("GBM: Available formats: {}", FORMATS.size())));
|
||||||
|
|
||||||
std::vector<uint64_t> explicitModifiers;
|
std::vector<uint64_t> explicitModifiers;
|
||||||
|
|
||||||
if (attrs.format == DRM_FORMAT_INVALID) {
|
if (attrs.format == DRM_FORMAT_INVALID) {
|
||||||
|
@ -88,6 +90,9 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
|
|
||||||
// check if we can use modifiers. If the requested support has any explicit modifier
|
// check if we can use modifiers. If the requested support has any explicit modifier
|
||||||
// supported by the primary backend, we can.
|
// supported by the primary backend, we can.
|
||||||
|
if (!RENDERABLE.empty()) {
|
||||||
|
TRACE(allocator->backend->log(AQ_LOG_TRACE, std::format("GBM: Renderable has {} formats, clipping", RENDERABLE.size())));
|
||||||
|
|
||||||
for (auto& f : FORMATS) {
|
for (auto& f : FORMATS) {
|
||||||
if (f.drmFormat != attrs.format)
|
if (f.drmFormat != attrs.format)
|
||||||
continue;
|
continue;
|
||||||
|
@ -96,7 +101,7 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
if (m == DRM_FORMAT_MOD_INVALID)
|
if (m == DRM_FORMAT_MOD_INVALID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!RENDERABLE.empty() && params.scanout && !CURSOR && !MULTIGPU) {
|
if (params.scanout && !CURSOR && !MULTIGPU) {
|
||||||
// regular scanout plane, check if the format is renderable
|
// regular scanout plane, check if the format is renderable
|
||||||
auto rformat = std::find_if(RENDERABLE.begin(), RENDERABLE.end(), [f](const auto& e) { return e.drmFormat == f.drmFormat; });
|
auto rformat = std::find_if(RENDERABLE.begin(), RENDERABLE.end(), [f](const auto& e) { return e.drmFormat == f.drmFormat; });
|
||||||
|
|
||||||
|
@ -114,6 +119,7 @@ Aquamarine::CGBMBuffer::CGBMBuffer(const SAllocatorBufferParams& params, Hypruti
|
||||||
explicitModifiers.push_back(m);
|
explicitModifiers.push_back(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: Nvidia cannot render to linear buffers. What do?
|
// FIXME: Nvidia cannot render to linear buffers. What do?
|
||||||
if (MULTIGPU) {
|
if (MULTIGPU) {
|
||||||
|
|
Loading…
Reference in a new issue