panfrost/midgard: Fix 3D texture regression

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-06-26 16:31:31 -07:00
parent 601d4d3157
commit 68a5b58fb9
1 changed files with 2 additions and 1 deletions

View File

@ -1569,7 +1569,8 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
/* Non-texel fetch doesn't need that
* nonsense. However we do use the Z
* for array indexing */
ins.texture.in_reg_swizzle = SWIZZLE_XYXZ;
bool is_3d = instr->sampler_dim == GLSL_SAMPLER_DIM_3D;
ins.texture.in_reg_swizzle = is_3d ? SWIZZLE_XYZZ : SWIZZLE_XYXZ;
}
}