mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render/vulkan: allow rendering to non-8-bit buffers
This is implemented by a two-subpass rendering scheme; the first subpass draws (and blends) onto a linear R16G16B16A16_SFLOAT buffer, while the second subpass performs linear->srgb conversion, writing onto the actual output buffer.
This commit is contained in:
parent
8cdc4b7a31
commit
10dd416694
5 changed files with 651 additions and 90 deletions
|
|
@ -293,10 +293,9 @@ static bool query_modifier_support(struct wlr_vk_device *dev,
|
|||
char render_status[256], texture_status[256];
|
||||
|
||||
// check that specific modifier for render usage
|
||||
// also, only allow rendering to formats with SRGB encoding
|
||||
const char *errmsg = "unknown error";
|
||||
if ((m.drmFormatModifierTilingFeatures & render_features) == render_features &&
|
||||
props->format.is_srgb && !props->format.is_ycbcr) {
|
||||
!props->format.is_ycbcr) {
|
||||
struct wlr_vk_format_modifier_props p = {0};
|
||||
if (query_modifier_usage_support(dev, props->format.vk, render_usage, &m, &p, &errmsg)) {
|
||||
props->dmabuf.render_mods[props->dmabuf.render_mod_count++] = p;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue