cuTexObjectCreate return CUDA_ERROR_INVALID_VALUE

CUresult cr = CUDA_SUCCESS;

	CUDA_ARRAY3D_DESCRIPTOR desc3D;
	desc3D.Format = CU_AD_FORMAT_SIGNED_INT16;
	desc3D.Width = m_amVolHeader.width;
	desc3D.Height = m_amVolHeader.height;
	desc3D.Depth = m_amVolHeader.depth;
	desc3D.NumChannels = 1;
	desc3D.Flags = 0;

	cr = cuArray3DCreate( &m_cuArray, &desc3D );

	CUDA_MEMCPY3D mem3D;
	memset( &mem3D, 0, sizeof(CUDA_MEMCPY3D) );
	mem3D.dstMemoryType	= CU_MEMORYTYPE_ARRAY;
	mem3D.dstArray		= m_cuArray;
	mem3D.dstXInBytes	= desc3D.Width * sizeof( int16_t );
	mem3D.dstY		= desc3D.Height;
	mem3D.dstZ		= desc3D.Depth;
	mem3D.srcMemoryType	= CU_MEMORYTYPE_HOST;
	mem3D.srcHost		= m_amVolData;
	mem3D.srcPitch		= desc3D.Width * desc3D.Depth * sizeof( int16_t );
	mem3D.srcHeight		= desc3D.Height;
 	mem3D.srcXInBytes	= desc3D.Width * sizeof( int16_t );
 	mem3D.srcY		= desc3D.Height;
 	mem3D.srcZ		= desc3D.Depth;
	cr = cuMemcpy3D( &mem3D );

	CUDA_RESOURCE_DESC		descRes;
	descRes.resType	= CU_RESOURCE_TYPE_ARRAY;
	descRes.res.array.hArray = m_cuArray;
	descRes.flags = 0;

	CUDA_TEXTURE_DESC		descTex;
	descTex.addressMode[0]		= CU_TR_ADDRESS_MODE_CLAMP;
	descTex.addressMode[1]		= CU_TR_ADDRESS_MODE_CLAMP;
	descTex.addressMode[2]		= CU_TR_ADDRESS_MODE_CLAMP;
	descTex.filterMode		= CU_TR_FILTER_MODE_LINEAR;
	descTex.flags			= CU_TRSF_READ_AS_INTEGER | CU_TRSF_NORMALIZED_COORDINATES;
	descTex.maxAnisotropy		= 1;
	descTex.mipmapFilterMode	= CU_TR_FILTER_MODE_LINEAR;
	descTex.mipmapLevelBias		= 0;
	descTex.minMipmapLevelClamp	= 0;
	descTex.maxMipmapLevelClamp	= 0;

	CUDA_RESOURCE_VIEW_DESC	descView;
	descView.format		= CU_RES_VIEW_FORMAT_SINT_1X16;
	descView.width		= desc3D.Width;
	descView.height		= desc3D.Height;
	descView.depth		= desc3D.Depth;
	descView.firstMipmapLevel	= 0;
	descView.lastMipmapLevel	= 0;
	descView.firstLayer		= 0;
	descView.lastLayer		= 0;

	cr = cuTexObjectCreate( &m_cuTex, &descRes, &descTex, &descView );

tip tip please

ok i correct it with unbelievable reason
in DESC there is a param called ‘reserved’ which should be set to 0

ok i correct it with unbelievable reason
in DESC there is a param called ‘reserved’ which should be set to 0

i also found this website is not well support by leibao explorer