aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/interfaces/wlr_output.h1
-rw-r--r--include/wlr/types/wlr_output.h19
2 files changed, 20 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index 100754f6..5ae1ab56 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -21,6 +21,7 @@
(WLR_OUTPUT_STATE_DAMAGE | \
WLR_OUTPUT_STATE_SCALE | \
WLR_OUTPUT_STATE_TRANSFORM | \
+ WLR_OUTPUT_STATE_RENDER_FORMAT | \
WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED)
/**
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 9d3dc3cb..7d7fbaad 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -61,6 +61,7 @@ enum wlr_output_state_field {
WLR_OUTPUT_STATE_TRANSFORM = 1 << 5,
WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED = 1 << 6,
WLR_OUTPUT_STATE_GAMMA_LUT = 1 << 7,
+ WLR_OUTPUT_STATE_RENDER_FORMAT = 1 << 8,
};
enum wlr_output_state_mode_type {
@@ -78,6 +79,7 @@ struct wlr_output_state {
float scale;
enum wl_output_transform transform;
bool adaptive_sync_enabled;
+ uint32_t render_format;
// only valid if WLR_OUTPUT_STATE_BUFFER
struct wlr_buffer *buffer;
@@ -134,6 +136,7 @@ struct wlr_output {
enum wl_output_subpixel subpixel;
enum wl_output_transform transform;
enum wlr_output_adaptive_sync_status adaptive_sync_status;
+ uint32_t render_format;
bool needs_frame;
// damage for cursors and fullscreen surface, in output-local coordinates
@@ -309,6 +312,22 @@ void wlr_output_set_transform(struct wlr_output *output,
*/
void wlr_output_enable_adaptive_sync(struct wlr_output *output, bool enabled);
/**
+ * Set the output buffer render format. Default value: DRM_FORMAT_XRGB8888
+ *
+ * While high bit depth render formats are necessary for a monitor to receive
+ * useful high bit data, they do not guarantee it; a DRM_FORMAT_XBGR2101010
+ * buffer will only lead to sending 10-bpc image data to the monitor if
+ * hardware and software permit this.
+ *
+ * This only affects the format of the output buffer used when rendering,
+ * as with `wlr_output_attach_render`. It has no impact on the cursor buffer
+ * format, or on the formats supported for direct scan-out (see also
+ * `wlr_output_attach_buffer`).
+ *
+ * This format is double-buffered state, see `wlr_output_commit`.
+ */
+void wlr_output_set_render_format(struct wlr_output *output, uint32_t format);
+/**
* Sets a scale for the output.
*
* Scale is double-buffered state, see `wlr_output_commit`.