From: Ilia Mirkin Date: Sat, 4 Mar 2017 18:52:48 +0000 (-0500) Subject: st/mesa: set result writemask based on ir type X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dab88e9af7a35ebcdd0fc87df97f4b13e908552a;p=mesa.git st/mesa: set result writemask based on ir type 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 --- 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: