Hi all,
I believe this is a known issue and I’d like to know whether you guys intend to fix this one or should I hack my code?
, line 2226; error : State space mismatch between instruction and address in i
nstruction 'tex'
Basically I am doing something like that:
typedef texture<GridVelocityCell, 1, cudaReadModeElementType> VelocityTex;
typedef texture<GridDensityCell, 1, cudaReadModeElementType> DensityTex;
...
GridVelocityCell* vel;
DensityTex* dens;
VelocityTex velTex;
DensityTex densTex;
...
template <typename T, typename Tex>
__global__ void deviceFoo(T* field, Tex t, ...)
{
const int index = ...;
const T val = (T)tex1Dfetch(t, index);
}
...
template <typename T, typename Tex>
void hostFoo(T* field, Tex t, ...)
{
deviceFoo<T, Tex><<<gridSize, blockSize>>>(field, t, ...);
}
...
hostFoo<GridVelocityCell, VelocityTex>(vel, velTex, ...);
hostFoo<GridDensityCell, DensityTex>(dens, densTex, ...);
Thanks