From ab2602001714117f73f6df7216107cdf160b9c94 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 18 Mar 2022 08:53:36 +0100 Subject: [PATCH] gallium: rename window-space position cap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cap is no longer TGSI specific, so let's rename it to reflect reality. Acked-by: Marek Olšák Part-of: --- docs/gallium/screen.rst | 5 ++--- src/gallium/auxiliary/util/u_screen.c | 2 +- src/gallium/auxiliary/util/u_tests.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/r300/r300_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/frontends/nine/adapter9.c | 2 +- src/gallium/frontends/nine/device9.c | 2 +- src/gallium/include/pipe/p_defines.h | 2 +- 16 files changed, 17 insertions(+), 18 deletions(-) diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index d3fa13741a6..61a8297ab04 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -235,9 +235,8 @@ The integer capabilities: implemented. * ``PIPE_CAP_TEXTURE_GATHER_OFFSETS``: Whether the ``TG4`` instruction can accept 4 offsets. -* ``PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION``: Whether - TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION is supported, which disables clipping - and viewport transformation. +* ``PIPE_CAP_VS_WINDOW_SPACE_POSITION``: Whether window-space position is + supported, which disables clipping and viewport transformation. * ``PIPE_CAP_MAX_VERTEX_STREAMS``: The maximum number of vertex streams supported by the geometry shader. If stream-out is supported, this should be at least 1. If stream-out is not supported, this should be 0. diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index b2ab7edc1f2..a0cd5fdcf3d 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -196,7 +196,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_MAX_VERTEX_STREAMS: case PIPE_CAP_DRAW_INDIRECT: case PIPE_CAP_FS_FINE_DERIVATIVE: diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 71e954ff94d..eb58c05cc26 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -322,7 +322,7 @@ tgsi_vs_window_space_position(struct pipe_context *ctx) static const float red[] = {1, 0, 0, 1}; if (!ctx->screen->get_param(ctx->screen, - PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION)) { + PIPE_CAP_VS_WINDOW_SPACE_POSITION)) { util_report_result(SKIP); return; } diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c index 38c501b677d..557176bdaf0 100644 --- a/src/gallium/drivers/crocus/crocus_screen.c +++ b/src/gallium/drivers/crocus/crocus_screen.c @@ -184,7 +184,7 @@ crocus_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: case PIPE_CAP_CLEAR_TEXTURE: case PIPE_CAP_SHADER_GROUP_VOTE: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_SHADER_ARRAY_COMPONENTS: case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS: diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 62b1bab80d2..29b2b219f3d 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -226,7 +226,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_CLEAR_TEXTURE: case PIPE_CAP_CLEAR_SCISSORED: case PIPE_CAP_SHADER_GROUP_VOTE: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_SHADER_ARRAY_COMPONENTS: case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS: diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 88214a178c8..359c200279f 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -248,7 +248,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: return 4; - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: return 1; case PIPE_CAP_FS_FINE_DERIVATIVE: return 1; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 0cfdeb9e6a1..4ffbf5ca8fa 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -168,7 +168,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_TEXTURE_QUERY_LOD: case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_USER_VERTEX_BUFFERS: case PIPE_CAP_COMPUTE: case PIPE_CAP_DRAW_INDIRECT: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 91a0557e33f..1fb7d073a29 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -302,7 +302,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_FAKE_SW_MSAA: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT: case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 2628d61415a..26df3bcf101 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -369,7 +369,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY: case PIPE_CAP_FAKE_SW_MSAA: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_VERTEXID_NOBASE: case PIPE_CAP_RESOURCE_FROM_USER_MEMORY: case PIPE_CAP_FS_POSITION_IS_SYSVAL: diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 7d137f5cc22..40f5e5c0a5a 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -190,7 +190,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_PRIMITIVE_RESTART: case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX: case PIPE_CAP_USER_VERTEX_BUFFERS: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: return !r300screen->caps.has_tcl; /* HWTCL-only features / limitations. */ diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 3749b50424c..b197ac6c975 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -298,7 +298,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_QUERY_PIPELINE_STATISTICS: case PIPE_CAP_TEXTURE_MULTISAMPLE: case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_VS_LAYER_VIEWPORT: case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_CLIP_HALFZ: diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index a09a6eb979b..2fcde57bea6 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -97,7 +97,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_SAMPLE_SHADING: case PIPE_CAP_DRAW_INDIRECT: case PIPE_CAP_CLIP_HALFZ: - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: case PIPE_CAP_POLYGON_OFFSET_CLAMP: case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 93d93735e6f..2fb83f04925 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -232,7 +232,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_TEXTURE_QUERY_LOD: return 1; - case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: + case PIPE_CAP_VS_WINDOW_SPACE_POSITION: return 1; case PIPE_CAP_FS_FINE_DERIVATIVE: return 1; diff --git a/src/gallium/frontends/nine/adapter9.c b/src/gallium/frontends/nine/adapter9.c index 2b7eb87380c..2097cc1c751 100644 --- a/src/gallium/frontends/nine/adapter9.c +++ b/src/gallium/frontends/nine/adapter9.c @@ -646,7 +646,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This, D3DPIPECAP(MIXED_COLORBUFFER_FORMATS, D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS) | D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING | D3DPMISCCAPS_FOGVERTEXCLAMPED; - if (!screen->get_param(screen, PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION)) + if (!screen->get_param(screen, PIPE_CAP_VS_WINDOW_SPACE_POSITION)) pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_CLIPTLVERTS; pCaps->RasterCaps = diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index 42541fce2b4..5a0598ca087 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -556,7 +556,7 @@ NineDevice9_ctor( struct NineDevice9 *This, This->driver_caps.user_sw_vbufs = This->screen_sw->get_param(This->screen_sw, PIPE_CAP_USER_VERTEX_BUFFERS); This->vertex_uploader = This->csmt_active ? This->pipe_secondary->stream_uploader : This->context.pipe->stream_uploader; - This->driver_caps.window_space_position_support = GET_PCAP(TGSI_VS_WINDOW_SPACE_POSITION); + This->driver_caps.window_space_position_support = GET_PCAP(VS_WINDOW_SPACE_POSITION); This->driver_caps.vs_integer = pScreen->get_shader_param(pScreen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_INTEGERS); This->driver_caps.ps_integer = pScreen->get_shader_param(pScreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_INTEGERS); This->driver_caps.offset_units_unscaled = GET_PCAP(POLYGON_OFFSET_UNITS_UNSCALED); diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 91b07bf97e4..74997da95cd 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -826,7 +826,7 @@ enum pipe_cap PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET, PIPE_CAP_SAMPLE_SHADING, PIPE_CAP_TEXTURE_GATHER_OFFSETS, - PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION, + PIPE_CAP_VS_WINDOW_SPACE_POSITION, PIPE_CAP_MAX_VERTEX_STREAMS, PIPE_CAP_DRAW_INDIRECT, PIPE_CAP_FS_FINE_DERIVATIVE,