From 0de610dfc3e9420d4b0286b93c207a17078c03d0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 14 Apr 2026 16:30:45 +1000 Subject: [PATCH] nvk: don't set sector promotion on texture headers This appears to cause some sort of prefetching which is causing page faults for linear textures on the following page after the texture allocation. This might be okay for tiled, but for now just disable it. The test crashing this was to allocate an 800x409 linear 2D texture which gnome-initial-setup was doing. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15277 Cc: mesa-stable Reviewed-by: Mel Henning (cherry picked from commit 7067b6684639614a1d3179cf44d6ead277b05904) Part-of: --- .pick_status.json | 2 +- src/nouveau/nil/descriptor.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b41848ed2aa..c39fd1212a2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6214,7 +6214,7 @@ "description": "nvk: don't set sector promotion on texture headers", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/nouveau/nil/descriptor.rs b/src/nouveau/nil/descriptor.rs index 0bcb54c7df4..4b6aa660ef1 100644 --- a/src/nouveau/nil/descriptor.rs +++ b/src/nouveau/nil/descriptor.rs @@ -521,7 +521,7 @@ fn nvb097_fill_image_view_desc( th.set_field(clb097::TEXHEAD_BL_S_R_G_B_CONVERSION, view.format.is_srgb()); - set_enum!(th, clb097, TEXHEAD_BL_SECTOR_PROMOTION, PROMOTE_TO_2_V); + set_enum!(th, clb097, TEXHEAD_BL_SECTOR_PROMOTION, NO_PROMOTION); set_enum!(th, clb097, TEXHEAD_BL_BORDER_SIZE, BORDER_SAMPLER_COLOR); // In the sampler, the two options for FLOAT_COORD_NORMALIZATION are: @@ -703,7 +703,7 @@ fn nvcb97_fill_image_view_desc( view.format.is_srgb(), ); - set_enum!(th, clcb97, TEXHEAD_V2_BL_SECTOR_PROMOTION, PROMOTE_TO_2_V); + set_enum!(th, clcb97, TEXHEAD_V2_BL_SECTOR_PROMOTION, NO_PROMOTION); set_enum!(th, clcb97, TEXHEAD_V2_BL_BORDER_SOURCE, BORDER_COLOR); // In the sampler, the two options for FLOAT_COORD_NORMALIZATION are: @@ -802,7 +802,7 @@ fn nvb097_nil_fill_buffer_desc( set_enum!(th, clb097, TEXHEAD_1D_TEXTURE_TYPE, ONE_D_BUFFER); // TODO: Do we need this? - set_enum!(th, clb097, TEXHEAD_1D_SECTOR_PROMOTION, PROMOTE_TO_2_V); + set_enum!(th, clb097, TEXHEAD_1D_SECTOR_PROMOTION, NO_PROMOTION); } fn nvcb97_nil_fill_buffer_desc( @@ -833,7 +833,7 @@ fn nvcb97_nil_fill_buffer_desc( th.set_field(clcb97::TEXHEAD_V2_1DRT_WIDTH_MINUS_ONE, num_elements - 1); // TODO: Do we need this? - set_enum!(th, clcb97, TEXHEAD_1D_SECTOR_PROMOTION, PROMOTE_TO_2_V); + set_enum!(th, clcb97, TEXHEAD_1D_SECTOR_PROMOTION, NO_PROMOTION); } pub const ZERO_SWIZZLE: [nil_rs_bindings::pipe_swizzle; 4] = [