From d9affb76ba45a05e241f657e7ad670d6f19ebf80 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 18 May 2023 13:17:13 -0700 Subject: [PATCH] svga: Switch to preferring NIR by default. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The flag has been here for a long time, it's time for SVGA to start ingesting NIR like other drivers do. Reviewed-by: Alyssa Rosenzweig Acked-by: Marek Olšák Part-of: --- src/gallium/drivers/svga/svga_screen.c | 14 ++++++-------- src/gallium/drivers/svga/svga_screen.h | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index d375f07..84a25f0 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -536,9 +536,9 @@ vgpu9_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 16; case PIPE_SHADER_CAP_PREFERRED_IR: - return svgascreen->debug.nir ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI; + return PIPE_SHADER_IR_NIR; case PIPE_SHADER_CAP_SUPPORTED_IRS: - return (1 << PIPE_SHADER_IR_TGSI) | (svgascreen->debug.nir ? (1 << PIPE_SHADER_IR_NIR) : 0); + return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR); case PIPE_SHADER_CAP_DROUND_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: @@ -600,9 +600,9 @@ vgpu9_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 0; case PIPE_SHADER_CAP_PREFERRED_IR: - return svgascreen->debug.nir ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI; + return PIPE_SHADER_IR_NIR; case PIPE_SHADER_CAP_SUPPORTED_IRS: - return (1 << PIPE_SHADER_IR_TGSI) | (svgascreen->debug.nir ? (1 << PIPE_SHADER_IR_NIR) : 0); + return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR); case PIPE_SHADER_CAP_DROUND_SUPPORTED: case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE: case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS: @@ -712,10 +712,10 @@ vgpu10_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return sws->have_gl43 ? PIPE_MAX_SAMPLERS : SVGA3D_DX_MAX_SAMPLERS; case PIPE_SHADER_CAP_PREFERRED_IR: - return svgascreen->debug.nir ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI; + return PIPE_SHADER_IR_NIR; case PIPE_SHADER_CAP_SUPPORTED_IRS: if (sws->have_gl43) - return (1 << PIPE_SHADER_IR_TGSI) | (svgascreen->debug.nir ? (1 << PIPE_SHADER_IR_NIR) : 0); + return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR); else return 0; case PIPE_SHADER_CAP_DROUND_SUPPORTED: @@ -1089,8 +1089,6 @@ svga_screen_create(struct svga_winsys_screen *sws) debug_get_bool_option("SVGA_NO_SAMPLER_VIEW", FALSE); svgascreen->debug.no_cache_index_buffers = debug_get_bool_option("SVGA_NO_CACHE_INDEX_BUFFERS", FALSE); - svgascreen->debug.nir = - debug_get_bool_option("SVGA_NIR", FALSE); screen = &svgascreen->screen; diff --git a/src/gallium/drivers/svga/svga_screen.h b/src/gallium/drivers/svga/svga_screen.h index 34830af..35884d0 100644 --- a/src/gallium/drivers/svga/svga_screen.h +++ b/src/gallium/drivers/svga/svga_screen.h @@ -72,8 +72,7 @@ struct svga_screen unsigned no_cache_index_buffers:1; unsigned tessellation:1; unsigned sampler_state_mapping:1; - unsigned nir:1; - unsigned pad:23; + unsigned pad:24; } debug; unsigned texture_timestamp; -- 2.7.4