diff options
Diffstat (limited to 'src/cuda-sim')
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 20 | ||||
| -rw-r--r-- | src/cuda-sim/instructions.cc | 7 |
2 files changed, 7 insertions, 20 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index 1982218..b1893a0 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -142,21 +142,11 @@ void gpgpu_t::gpgpu_ptx_sim_bindTextureToArray(const struct textureReference* te printf("GPGPU-Sim PTX: texture cache linesize = %d\n", m_function_model_config.get_texcache_linesize()); //first determine base Tx size for given linesize switch (m_function_model_config.get_texcache_linesize()) { - case 16: - Tx = 4; - break; - case 32: - Tx = 8; - break; - case 64: - Tx = 8; - break; - case 128: - Tx = 16; - break; - case 256: - Tx = 16; - break; + case 16: Tx = 4; break; + case 32: Tx = 8; break; + case 64: Tx = 8; break; + case 128: Tx = 16; break; + case 256: Tx = 16; break; default: printf("GPGPU-Sim PTX: Line size of %d bytes currently not supported.\n", m_function_model_config.get_texcache_linesize()); assert(0); diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 2b6ce9c..ad2eb43 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -3745,11 +3745,8 @@ void tex_impl( const ptx_instruction *pI, ptx_thread_info *thread ) thread->m_last_effective_address = tex_array_index; break; case GEOM_MODIFIER_2D: - x_block_coord = x; - x_block_coord = x_block_coord >> (texInfo->Tx_numbits + texInfo->texel_size_numbits); - - y_block_coord = y; - y_block_coord = y_block_coord >> texInfo->Ty_numbits; + x_block_coord = x >> (texInfo->Tx_numbits + texInfo->texel_size_numbits); + y_block_coord = y >> texInfo->Ty_numbits; memreqindex = ((y_block_coord*cuArray->width/texInfo->Tx)+x_block_coord)<<6; |
