diff options
author | Ian Romanick <[email protected]> | 2010-08-05 17:57:48 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-08-05 17:57:48 -0700 |
commit | 0a86d766ef0d98abd3373609a637bf137203e994 (patch) | |
tree | e1bcfd7005990b9cdcdd8697027a27a9b812c07a /src/mesa/program | |
parent | 4f397e1d641bf265b395f7dec062dab451fb5a54 (diff) |
ir_to_mesa: Handle texture-array samplers
Fixes piglit test array_texture.
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; |