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 <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user