From dab88e9af7a35ebcdd0fc87df97f4b13e908552a Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 4 Mar 2017 13:52:48 -0500 Subject: [PATCH] st/mesa: set result writemask based on ir type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This prevents textureQueryLevels, which maps as LODQ, from ending up with a xyzw writemask, which is illegal. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100061 Signed-off-by: Ilia Mirkin Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 7b917ebe47f..c53da293222 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4166,6 +4166,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) */ result_src = get_temp(ir->type); result_dst = st_dst_reg(result_src); + result_dst.writemask = (1 << ir->type->vector_elements) - 1; switch (ir->op) { case ir_tex: -- 2.30.2