From: Ian Romanick Date: Fri, 6 Aug 2010 00:57:48 +0000 (-0700) Subject: ir_to_mesa: Handle texture-array samplers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a86d766ef0d98abd3373609a637bf137203e994;p=mesa.git ir_to_mesa: Handle texture-array samplers Fixes piglit test array_texture. --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 26fbc4349ab..f5e5f7d7b87 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2040,10 +2040,12 @@ ir_to_mesa_visitor::visit(ir_texture *ir) switch (sampler->type->sampler_dimensionality) { case GLSL_SAMPLER_DIM_1D: - inst->tex_target = TEXTURE_1D_INDEX; + inst->tex_target = (sampler->type->sampler_array) + ? TEXTURE_1D_ARRAY_INDEX : TEXTURE_1D_INDEX; break; case GLSL_SAMPLER_DIM_2D: - inst->tex_target = TEXTURE_2D_INDEX; + inst->tex_target = (sampler->type->sampler_array) + ? TEXTURE_2D_ARRAY_INDEX : TEXTURE_2D_INDEX; break; case GLSL_SAMPLER_DIM_3D: inst->tex_target = TEXTURE_3D_INDEX;