mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
Gallium: Add new CAPS to indicate whether a driver can switch SRGB write
Add a new cap that indicates whether the drivers supports
enabling/disabling the conversion from linear space to sRGB
for a framebuffer attachment. In Driver terms that this CAP indicates
whether the driver can switcht between a linear and and a sRGB surface
format for draw destinations witout changing the sourface itself.
v2: rename CAP to DEST_SURFACE_SRGB_CONTROL to reflect its
purpouse better (pointed out by Ilia Mirkin)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
75b3719c4f
commit
8021f1875e
3 changed files with 6 additions and 0 deletions
|
|
@ -334,6 +334,8 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
|||
|
||||
case PIPE_CAP_SURFACE_SAMPLE_COUNT:
|
||||
return 0;
|
||||
case PIPE_CAP_DEST_SURFACE_SRGB_CONTROL:
|
||||
return 1;
|
||||
|
||||
default:
|
||||
unreachable("bad PIPE_CAP_*");
|
||||
|
|
|
|||
|
|
@ -484,6 +484,9 @@ The integer capabilities:
|
|||
images, buffers, and shared memory.
|
||||
* ``PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND``: True if the driver needs blend state to use zero/one instead of destination alpha for RGB/XRGB formats.
|
||||
* ``PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS``: True if the driver wants TESSINNER and TESSOUTER to be inputs (rather than system values) for tessellation evaluation shaders.
|
||||
* ``PIPE_CAP_DEST_SURFACE_SRGB_CONTROL``: Indicates whether the drivers
|
||||
supports switching the format between sRGB and linear for a surface that is
|
||||
used as destination in draw and blit calls.
|
||||
|
||||
.. _pipe_capf:
|
||||
|
||||
|
|
|
|||
|
|
@ -855,6 +855,7 @@ enum pipe_cap
|
|||
PIPE_CAP_TGSI_ATOMFADD,
|
||||
PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE,
|
||||
PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND,
|
||||
PIPE_CAP_DEST_SURFACE_SRGB_CONTROL,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue