diff options
author | Ilia Mirkin <[email protected]> | 2017-03-04 13:52:48 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-03-18 20:16:45 -0400 |
commit | dab88e9af7a35ebcdd0fc87df97f4b13e908552a (patch) | |
tree | 0676839fe99355eff859fd95d67f014965e4f3de /src/mesa | |
parent | 09f16de7e624938d46a63b8285fc5b21050962e9 (diff) |
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 <[email protected]>
Cc: [email protected]
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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: |