diff --git a/sycl/plugins/unified_runtime/ur/adapters/cuda/image.cpp b/sycl/plugins/unified_runtime/ur/adapters/cuda/image.cpp index 85fbdd092d941..64b6075e74032 100644 --- a/sycl/plugins/unified_runtime/ur/adapters/cuda/image.cpp +++ b/sycl/plugins/unified_runtime/ur/adapters/cuda/image.cpp @@ -131,8 +131,7 @@ cudaToUrImageChannelFormat(CUarray_format cuda_format, } } -ur_result_t urTextureCreate(ur_context_handle_t hContext, - ur_sampler_handle_t hSampler, +ur_result_t urTextureCreate(ur_sampler_handle_t hSampler, const ur_image_desc_t *pImageDesc, CUDA_RESOURCE_DESC ResourceDesc, ur_exp_image_handle_t *phRetImage) { @@ -147,7 +146,7 @@ ur_result_t urTextureCreate(ur_context_handle_t hContext, /// | 1 | filter mode /// | 0 | normalize coords CUDA_TEXTURE_DESC ImageTexDesc = {}; - CUaddress_mode AddrMode; + CUaddress_mode AddrMode = {}; ur_sampler_addressing_mode_t AddrModeProp = hSampler->getAddressingMode(); if (AddrModeProp == (UR_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE - UR_SAMPLER_ADDRESSING_MODE_NONE)) { @@ -465,8 +464,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp( return UR_RESULT_ERROR_INVALID_VALUE; } - UR_CHECK_ERROR(urTextureCreate(hContext, hSampler, pImageDesc, - image_res_desc, phImage)); + UR_CHECK_ERROR( + urTextureCreate(hSampler, pImageDesc, image_res_desc, phImage)); auto urMemObj = std::unique_ptr(new ur_mem_handle_t_{ hContext, (CUarray)hImageMem, (CUtexObject)*phImage, hSampler,