panfrost: Zero r_dimension for buffer textures

Instead of reading wrong side of the union (undefined behaviour). Fixes
a GenXML assertion failure in
KHR-GLES31.core.texture_buffer.texture_buffer_texture_buffer_range

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>
This commit is contained in:
Alyssa Rosenzweig
2021-06-03 11:07:45 -04:00
committed by Marge Bot
parent a78487f795
commit d61162af50
+2 -1
View File
@@ -1562,7 +1562,8 @@ emit_image_bufs(struct panfrost_batch *batch, enum pipe_shader_type shader,
pan_pack(bufs + (i * 2) + 1, ATTRIBUTE_BUFFER_CONTINUATION_3D, cfg) {
cfg.s_dimension = rsrc->base.width0;
cfg.t_dimension = rsrc->base.height0;
cfg.r_dimension = is_3d ? rsrc->base.depth0 :
cfg.r_dimension = is_buffer ? 1 :
is_3d ? rsrc->base.depth0 :
image->u.tex.last_layer - image->u.tex.first_layer + 1;
cfg.row_stride =