On Sun, Nov 25, 2018 at 5:43 PM Karol Herbst <[email protected]> wrote: > > On Sun, Nov 25, 2018 at 5:48 PM Ilia Mirkin <[email protected]> wrote: > > > > Would it make sense to instead keep track of a samplers_bound[] like > > we do for textures? It's only ever used in a context of > > > > for (i = 0; i < num_samplers; i++) > > if (samplers[i]) > > do stuff > > > > So having a mask would actually optimize that, and make this logic much > > simpler. > > was trying to come up with something more meaningful, but we usually > loop over all samplers anyway, so we either loop until we had > num_samplers or we check the mask up to PIPE_NUM_SAMPLERS bits... I > doubt that we would win much at all. Anyway, in my local version of > that patch I dropped those "num_samplers[s] = 0;" assignments as they > weren't making much sense to begin with. We might be able to decrease > num_samplers if we remove the last one, but I don't want to change > much of the behavior here anyway. We could improve that code in future > patches though.
Then you should drop num_samplers entirely. But really, just make a mask, and iterate over the bits in the mask. Should be trivial. _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
