Mesa (master): radv: do not honor a user-specified pitch on GFX 10.3
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 5 11:33:41 UTC 2020
Module: Mesa
Branch: master
Commit: 22c807982994d6aab7b1c7d9ac33c5fa033cc5f8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=22c807982994d6aab7b1c7d9ac33c5fa033cc5f8
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Aug 4 10:30:41 2020 +0200
radv: do not honor a user-specified pitch on GFX 10.3
According to RadeonSI, it breaks mipmapping.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6168>
---
src/amd/vulkan/radv_image.c | 26 +++++---------------------
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 3d29e1cfbce..4644393196d 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -833,27 +833,11 @@ gfx10_make_texture_descriptor(struct radv_device *device,
last_level) |
S_00A00C_BC_SWIZZLE(gfx9_border_color_swizzle(swizzle)) |
S_00A00C_TYPE(type);
-
- if (type == V_008F1C_SQ_RSRC_IMG_1D ||
- type == V_008F1C_SQ_RSRC_IMG_2D ||
- type == V_008F1C_SQ_RSRC_IMG_2D_MSAA) {
- /* 1D, 2D, and 2D_MSAA can set a custom pitch for shader
- * resources starting with gfx10.3 (ignored if pitch <=
- * width). Other texture targets can't. CB and DB can't set a
- * custom pitch for any target.
- * */
- if (device->physical_device->rad_info.chip_class >= GFX10_3)
- state[4] = S_00A010_DEPTH(image->planes[0].surface.u.gfx9.surf_pitch - 1);
- else
- state[4] = 0;
- } else {
- /* Depth is the the last accessible layer on gfx9+. The hw doesn't need
- * to know the total number of layers.
- */
- state[4] = S_00A010_DEPTH(type == V_008F1C_SQ_RSRC_IMG_3D ? depth - 1 : last_layer) |
- S_00A010_BASE_ARRAY(first_layer);
- }
-
+ /* Depth is the the last accessible layer on gfx9+. The hw doesn't need
+ * to know the total number of layers.
+ */
+ state[4] = S_00A010_DEPTH(type == V_008F1C_SQ_RSRC_IMG_3D ? depth - 1 : last_layer) |
+ S_00A010_BASE_ARRAY(first_layer);
state[5] = S_00A014_ARRAY_PITCH(0) |
S_00A014_MAX_MIP(image->info.samples > 1 ?
util_logbase2(image->info.samples) :
More information about the mesa-commit
mailing list