         #pragma unroll
         for (int p = 0; p < pixelCache; p += B_X/filtersPerThread) {
             if (p + shFilterLoadY < filterPixels) {
-                fPreload[c][p*filtersPerThread/B_X] = filters[p * numFilters + c * numFilters * filterPixels];
+                fPreload[c][p*filtersPerThread/B_X] = tex1Dfetch<float>(filters, filtersOffset + p * numFilters + c * numFilters * filterPixels);
             } else{
                 fPreload[c][p*filtersPerThread/B_X] = 0;
             }

                    }
                }
            }
            #pragma unroll
            for (int pp = 0; pp < 2; pp++) {
                fPreload[c][pp] = warp >= 3 || fPidxNext + pp*2 + shFilterLoadY >= filterPixels ? 0 : ff[c * numFilters* filterPixels + pp*2 * numFilters];
            }
        }

        __syncthreads();
    }


    const int shFilterLoadX = tidx % (B_Y * filtersPerThread);
    const int myImgIdx = blockIdx.x * B_X * imgsPerThread + threadIdx.x;

//    images += myImgIdx;
//    filters += blockFilterIdx
//            + shFilterLoadY * numFilters + shFilterLoadX;
//    if (!conv) { // NOTE: UNTESTED!
//        filters += moduleIdx * numColors * filterPixels * numFilters;
//    }

    const int imagesOffset = myImgIdx;
    const int filtersOffset = blockFilterIdx + shFilterLoadY * numFilters + shFilterLoadX
                            + (conv ? 0 : moduleIdx * numColors * filterPixels * numFilters);

    targets += moduleIdx * numImages
            + (blockFilterIdx + threadIdx.y * filtersPerThread) * numImages * numModules
