summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-sim.cc
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-09-01 04:53:32 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:48:54 -0700
commit23040dd42f1fb134da159a5ddf1d593b5d818122 (patch)
treedee65f75f92c2643850fd2954cdbea28d5f75be6 /src/cuda-sim/cuda-sim.cc
parent66a788b7463bb92595977c7540afa8a2adba2726 (diff)
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]
Diffstat (limited to 'src/cuda-sim/cuda-sim.cc')
-rw-r--r--src/cuda-sim/cuda-sim.cc4
1 files changed, 3 insertions, 1 deletions
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)