X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fglsl%2Floop_unroll.cpp;h=7a00fb8fea87400e1bd3d73fa83081031565fc3c;hb=e4512e1581cf90f56d13cfa6a809832ef3517283;hp=635e1dd99cd5058be97d1023047b5e009611da7d;hpb=edb8383c98ee23385731d0fc23a6b6673528a8ec;p=android-x86%2Fexternal-mesa.git diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp index 635e1dd99cd..7a00fb8fea8 100644 --- a/src/glsl/loop_unroll.cpp +++ b/src/glsl/loop_unroll.cpp @@ -100,6 +100,18 @@ public: virtual ir_visitor_status visit_enter(ir_dereference_array *ir) { + /* Force unroll in case of dynamic indexing with sampler arrays + * when EmitNoIndirectSampler is set. + */ + if (options->EmitNoIndirectSampler) { + if ((ir->array->type->is_array() && + ir->array->type->contains_sampler()) && + !ir->array_index->constant_expression_value()) { + unsupported_variable_indexing = true; + return visit_continue; + } + } + /* Check for arrays variably-indexed by a loop induction variable. * Unrolling the loop may convert that access into constant-indexing. *