From d139231b32b3bbf73750fb7fb6b46d7cbb9387db Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 5 Dec 2018 00:21:34 -0500 Subject: [PATCH] gallium: add PIPE_CAP_TGSI_ATOMFADD to indicate support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ATOMFADD is a little special -- make drivers have to specify it explicitly. Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/gallium/auxiliary/util/u_screen.c | 1 + src/gallium/docs/source/screen.rst | 2 ++ src/gallium/include/pipe/p_defines.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index aef21bc46ae..f1e8eda701f 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -311,6 +311,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS: case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS: case PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS: + case PIPE_CAP_TGSI_ATOMFADD: return 0; case PIPE_CAP_MAX_GS_INVOCATIONS: diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 24a4d5031e5..8eb71ae82c2 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -480,6 +480,8 @@ subpixel precision bias in bits during conservative rasterization. * ``PIPE_CAP_SURFACE_SAMPLE_COUNT_TEXTURE``: Whether the driver supports pipe_surface overrides of resource nr_samples. If set, will enable EXT_multisampled_render_to_texture. +* ``PIPE_CAP_TGSI_ATOMFADD``: Atomic floating point adds are supported on + images, buffers, and shared memory. .. _pipe_capf: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 6d96f1ccb5b..82c49c801e5 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -833,6 +833,7 @@ enum pipe_cap PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET, PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET, PIPE_CAP_SURFACE_SAMPLE_COUNT, + PIPE_CAP_TGSI_ATOMFADD, }; /** -- 2.30.2