From df40de91d9fcaae1f81d7579141a8ff7f66682ab Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 14 Mar 2022 09:17:08 +0100 Subject: [PATCH] gallium: rename fine derivative cap This is no longer TGSI specific, so let's rename it to reflect the reality. Reviewed-by: Adam Jackson Acked-by: Ian Romanick Part-of: --- docs/gallium/screen.rst | 2 +- docs/gallium/tgsi.rst | 4 ++-- src/gallium/auxiliary/util/u_screen.c | 2 +- src/gallium/drivers/crocus/crocus_screen.c | 2 +- src/gallium/drivers/iris/iris_screen.c | 2 +- src/gallium/drivers/llvmpipe/lp_screen.c | 2 +- src/gallium/drivers/nouveau/nv30/nv30_screen.c | 2 +- src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 +- src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/radeonsi/si_get.c | 2 +- src/gallium/drivers/softpipe/sp_screen.c | 2 +- src/gallium/drivers/virgl/virgl_screen.c | 2 +- src/gallium/drivers/zink/zink_screen.c | 2 +- src/gallium/include/pipe/p_defines.h | 2 +- src/mesa/state_tracker/st_extensions.c | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index 64674477b56..d6debf90f7a 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -249,7 +249,7 @@ The integer capabilities: * ``PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS``: Whether the driver supports taking the number of indirect draws from a separate parameter buffer, see pipe_draw_indirect_info::indirect_draw_count. -* ``PIPE_CAP_TGSI_FS_FINE_DERIVATIVE``: Whether the fragment shader supports +* ``PIPE_CAP_FS_FINE_DERIVATIVE``: Whether the fragment shader supports the FINE versions of DDX/DDY. * ``PIPE_CAP_VENDOR_ID``: The vendor ID of the underlying hardware. If it's not available one should return 0xFFFFFFFF. diff --git a/docs/gallium/tgsi.rst b/docs/gallium/tgsi.rst index 4ffddb344b2..4b8fea322c0 100644 --- a/docs/gallium/tgsi.rst +++ b/docs/gallium/tgsi.rst @@ -377,7 +377,7 @@ This instruction replicates its result. .. opcode:: DDX, DDX_FINE - Derivative Relative To X -The fine variant is only used when ``PIPE_CAP_TGSI_FS_FINE_DERIVATIVE`` is +The fine variant is only used when ``PIPE_CAP_FS_FINE_DERIVATIVE`` is advertised. When it is, the fine version guarantees one derivative per row while DDX is allowed to be the same for the entire 2x2 quad. @@ -394,7 +394,7 @@ while DDX is allowed to be the same for the entire 2x2 quad. .. opcode:: DDY, DDY_FINE - Derivative Relative To Y -The fine variant is only used when ``PIPE_CAP_TGSI_FS_FINE_DERIVATIVE`` is +The fine variant is only used when ``PIPE_CAP_FS_FINE_DERIVATIVE`` is advertised. When it is, the fine version guarantees one derivative per column while DDY is allowed to be the same for the entire 2x2 quad. diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 02bb85d7297..cdc45109b44 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -199,7 +199,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_MAX_VERTEX_STREAMS: case PIPE_CAP_DRAW_INDIRECT: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: return 0; case PIPE_CAP_VENDOR_ID: diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c index aba369ce60c..158e370389f 100644 --- a/src/gallium/drivers/crocus/crocus_screen.c +++ b/src/gallium/drivers/crocus/crocus_screen.c @@ -212,7 +212,7 @@ crocus_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MULTI_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS: case PIPE_CAP_TGSI_CLOCK: case PIPE_CAP_TGSI_TXQS: diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 3773562b3c3..e04a08df33e 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -194,7 +194,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES: case PIPE_CAP_VS_LAYER_VIEWPORT: case PIPE_CAP_TES_LAYER_VIEWPORT: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_SHADER_PACK_HALF_FLOAT: case PIPE_CAP_ACCELERATED: case PIPE_CAP_UMA: diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 43690d9eba4..0390707cdfb 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -250,7 +250,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) return 4; case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: return 1; - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: return 1; case PIPE_CAP_TGSI_TEX_TXF_LZ: case PIPE_CAP_SAMPLER_VIEW_TARGET: diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index cf95bf1d853..e9773234a68 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -174,7 +174,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_CONDITIONAL_RENDER_INVERTED: case PIPE_CAP_SAMPLER_VIEW_TARGET: case PIPE_CAP_CLIP_HALFZ: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 0a7ea6b59d8..2b35afa0c64 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -230,7 +230,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_START_INSTANCE: case PIPE_CAP_USER_VERTEX_BUFFERS: case PIPE_CAP_TEXTURE_MULTISAMPLE: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_SAMPLER_VIEW_TARGET: case PIPE_CAP_CONDITIONAL_RENDER_INVERTED: case PIPE_CAP_CLIP_HALFZ: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 21b2fd251ed..a586aa8b2ff 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -261,7 +261,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: case PIPE_CAP_TEXTURE_GATHER_SM5: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_CONDITIONAL_RENDER_INVERTED: case PIPE_CAP_SAMPLER_VIEW_TARGET: case PIPE_CAP_CLIP_HALFZ: diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 4890c6bfdc3..bd4e46eceae 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -381,7 +381,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_CUBE_MAP_ARRAY: case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_TEXTURE_QUERY_LOD: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_SAMPLER_VIEW_TARGET: case PIPE_CAP_SHADER_PACK_HALF_FLOAT: case PIPE_CAP_TGSI_CLOCK: diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index c2020f36491..a9da503c9d4 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -102,7 +102,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: case PIPE_CAP_TGSI_TEXCOORD: - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: case PIPE_CAP_CONDITIONAL_RENDER_INVERTED: case PIPE_CAP_TEXTURE_FLOAT_LINEAR: case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR: diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 751521b9b31..301a8287949 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -234,7 +234,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: return 1; - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: return 1; case PIPE_CAP_SAMPLER_VIEW_TARGET: return 1; diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index ebd258da36d..79d564752fb 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -246,7 +246,7 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param) (vscreen->caps.caps.v2.host_feature_check_version < 2)) ? 4 : 1; case PIPE_CAP_CONDITIONAL_RENDER_INVERTED: return vscreen->caps.caps.v1.bset.conditional_render_inverted; - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: return vscreen->caps.caps.v1.bset.derivative_control; case PIPE_CAP_POLYGON_OFFSET_CLAMP: return vscreen->caps.caps.v1.bset.polygon_offset_clamp; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 3e438892f3e..7b5e72116b5 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -617,7 +617,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_SAMPLER_REDUCTION_MINMAX_ARB: return screen->vk_version >= VK_MAKE_VERSION(1,2,0) || screen->info.have_EXT_sampler_filter_minmax; - case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: + case PIPE_CAP_FS_FINE_DERIVATIVE: return 1; case PIPE_CAP_VENDOR_ID: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 1328a955a74..61af45d558f 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -829,7 +829,7 @@ enum pipe_cap PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION, PIPE_CAP_MAX_VERTEX_STREAMS, PIPE_CAP_DRAW_INDIRECT, - PIPE_CAP_TGSI_FS_FINE_DERIVATIVE, + PIPE_CAP_FS_FINE_DERIVATIVE, PIPE_CAP_VENDOR_ID, PIPE_CAP_DEVICE_ID, PIPE_CAP_ACCELERATED, diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 249e5a9dcbd..a766c02f5ec 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -789,7 +789,7 @@ void st_init_extensions(struct pipe_screen *screen, { o(OES_copy_image), PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS }, { o(ARB_cull_distance), PIPE_CAP_CULL_DISTANCE }, { o(ARB_depth_clamp), PIPE_CAP_DEPTH_CLIP_DISABLE }, - { o(ARB_derivative_control), PIPE_CAP_TGSI_FS_FINE_DERIVATIVE }, + { o(ARB_derivative_control), PIPE_CAP_FS_FINE_DERIVATIVE }, { o(ARB_draw_buffers_blend), PIPE_CAP_INDEP_BLEND_FUNC }, { o(ARB_draw_indirect), PIPE_CAP_DRAW_INDIRECT }, { o(ARB_draw_instanced), PIPE_CAP_VS_INSTANCEID },