From 23040dd42f1fb134da159a5ddf1d593b5d818122 Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Sat, 1 Sep 2012 04:53:32 -0800 Subject: Adding support for cudaReadModeNormalizedFloat (a texture read mode). See bug 18 (external) for detail. The blocked SDK benchmarks are still not working due to mismatch of texture element layout in memory between real GPU and GPGPU-Sim. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13933] --- src/cuda-sim/cuda-sim.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cuda-sim/cuda-sim.cc') diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index e6677fa..06fb7d3 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -93,10 +93,12 @@ void ptx_opcocde_latency_options (option_parser_t opp) { static address_type get_converge_point(address_type pc); -void gpgpu_t::gpgpu_ptx_sim_bindNameToTexture(const char* name, const struct textureReference* texref) +void gpgpu_t::gpgpu_ptx_sim_bindNameToTexture(const char* name, const struct textureReference* texref, int dim, int readmode, int ext) { std::string texname(name); m_NameToTextureRef[texname] = texref; + const textureReferenceAttr *texAttr = new textureReferenceAttr(texref, dim, (enum cudaTextureReadMode)readmode, ext); + m_TextureRefToAttribute[texref] = texAttr; } const char* gpgpu_t::gpgpu_ptx_sim_findNamefromTexture(const struct textureReference* texref) -- cgit v1.3