gallium: Add PIPE_CAP_BLEND_EQUATION_ADVANCED
authorElie Tournier <tournier.elie@gmail.com>
Tue, 2 Jun 2020 10:24:34 +0000 (11:24 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 06:19:16 +0000 (06:19 +0000)
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>

docs/gallium/screen.rst
src/gallium/auxiliary/util/u_screen.c
src/gallium/drivers/virgl/virgl_hw.h
src/gallium/include/pipe/p_defines.h

index 1c572f9af546124e533e110f171b5115960a12e6..4304764033aef67182f1860303b0d3ae44722376 100644 (file)
@@ -588,6 +588,7 @@ The integer capabilities:
 * ``PIPE_CAP_VIEWPORT_MASK``: Whether ``TGSI_SEMANTIC_VIEWPORT_MASK`` and ``TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE`` are supported (see GL_NV_viewport_array2).
 * ``PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE``: Whether mapping a buffer as unsynchronized from any thread is safe.
 * ``PIPE_CAP_GLSL_ZERO_INIT``: Choose a default zero initialization some glsl variables. If `1`, then all glsl shader variables and gl_FragColor are initialized to zero. If `2`, then shader out variables are not initialized but function out variables are.
+* ``PIPE_CAP_BLEND_EQUATION_ADVANCED``: Driver supports blend equation advanced without necessarily supporting FBFETCH.
 
 .. _pipe_capf:
 
index 59ff5dc84d57c98eb7482728a89223e529e3324d..ccf2fa8c75da54485046862d9bbda67edfa8cf5e 100644 (file)
@@ -281,6 +281,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
 
    case PIPE_CAP_FBFETCH:
    case PIPE_CAP_FBFETCH_COHERENT:
+   case PIPE_CAP_BLEND_EQUATION_ADVANCED:
    case PIPE_CAP_TGSI_MUL_ZERO_WINS:
    case PIPE_CAP_DOUBLES:
    case PIPE_CAP_INT64:
index 711bf8b590ecb9e624ec40775f4747cc7cd4bd61..bbf5f5f7519a59e5752a4a5b4716320387cf5f5e 100644 (file)
@@ -339,6 +339,9 @@ enum virgl_formats {
 #define VIRGL_CAP_CLEAR_TEXTURE        (1 << 30)
 /* Reserved for VIRGL_CAP_ARB_BUFFER_STORAGE */
 
+/* These are used by the capability_bits_v2 field in virgl_caps_v2. */
+#define VIRGL_CAP_V2_BLEND_EQUATION       (1 << 0)
+
 /* virgl bind flags - these are compatible with mesa 10.5 gallium.
  * but are fixed, no other should be passed to virgl either.
  */
@@ -476,6 +479,7 @@ struct virgl_caps_v2 {
         uint32_t host_feature_check_version;
         struct virgl_supported_format_mask supported_readback_formats;
         struct virgl_supported_format_mask scanout;
+        uint32_t capability_bits_v2;
 };
 
 union virgl_caps {
index ccb5fa112088acc75c8510f9d93d313cd957d29a..eac8f768705c0a5ca8d6a095a1e809a765985a36 100644 (file)
@@ -953,6 +953,7 @@ enum pipe_cap
    PIPE_CAP_ALPHA_TO_COVERAGE_DITHER_CONTROL,
    PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE,
    PIPE_CAP_GLSL_ZERO_INIT,
+   PIPE_CAP_BLEND_EQUATION_ADVANCED,
 };
 
 /**