Commit 9e1a74b7 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

implemented texture generator (per-tile)

parent cea7cb2c
Loading
Loading
Loading
Loading
+602 −45

File changed.

Preview size limit exceeded, changes collapsed.

+6 −6
Original line number Original line Diff line number Diff line
@@ -740,7 +740,7 @@ int main(int argc, char **argv)
#ifndef NOTEXTURES
#ifndef NOTEXTURES
//    cudaProfilerStart();
//    cudaProfilerStart();
    // testing textures
    // testing textures
    dim3 threads_texture(TEXTURE_THREADS_PER_TILE, TEXTURE_TILES_PER_BLOCK, 1);
    dim3 threads_texture(TEXTURE_THREADS_PER_TILE, NUM_CAMS, 1); // TEXTURE_TILES_PER_BLOCK, 1);
    dim3 grid_texture((num_textures + TEXTURE_TILES_PER_BLOCK-1) / TEXTURE_TILES_PER_BLOCK,1,1);
    dim3 grid_texture((num_textures + TEXTURE_TILES_PER_BLOCK-1) / TEXTURE_TILES_PER_BLOCK,1,1);
    printf("threads_texture=(%d, %d, %d)\n",threads_texture.x,threads_texture.y,threads_texture.z);
    printf("threads_texture=(%d, %d, %d)\n",threads_texture.x,threads_texture.y,threads_texture.z);
    printf("grid_texture=(%d, %d, %d)\n",grid_texture.x,grid_texture.y,grid_texture.z);
    printf("grid_texture=(%d, %d, %d)\n",grid_texture.x,grid_texture.y,grid_texture.z);
@@ -776,8 +776,8 @@ int main(int argc, char **argv)
		0.294118,              // float             weight0,            // scale for R
		0.294118,              // float             weight0,            // scale for R
		0.117647,              // float             weight1,            // scale for B
		0.117647,              // float             weight1,            // scale for B
		0.588235,              // float             weight2,            // scale for G
		0.588235,              // float             weight2,            // scale for G
		1.0,                   // int               dust_remove,        // Do not reduce average weight when only one image differes much from the average
		1,                     // int               dust_remove,        // Do not reduce average weight when only one image differes much from the average
//		1.0,                   // int               keep_weights,       // return channel weights after A in RGBA
		1,                     // int               keep_weights,       // return channel weights after A in RGBA
		dstride_textures/sizeof(float), // const size_t      texture_stride,     // in floats (now 256*4 = 1024)
		dstride_textures/sizeof(float), // const size_t      texture_stride,     // in floats (now 256*4 = 1024)
		gpu_textures);    // float           * gpu_texture_tiles);  // 4*16*16 rgba texture tiles
		gpu_textures);    // float           * gpu_texture_tiles);  // 4*16*16 rgba texture tiles