| 5260 | } |
| 5261 | |
| 5262 | static void VulkanSetTextureAsync(HContext _context, HTexture texture, const TextureParams& params, SetTextureAsyncCallback callback, void* user_data) |
| 5263 | { |
| 5264 | VulkanContext* context = (VulkanContext*)_context; |
| 5265 | if (context->m_AsyncProcessingSupport) |
| 5266 | { |
| 5267 | DM_MUTEX_SCOPED_LOCK(context->m_BaseContext.m_AssetHandleContainerMutex); |
| 5268 | VulkanTexture* tex = GetAssetFromContainer<VulkanTexture>(context->m_BaseContext.m_AssetHandleContainer, texture); |
| 5269 | |
| 5270 | PrepareTextureForUploading(context, tex, params); |
| 5271 | |
| 5272 | tex->m_Base.m_DataState |= 1<<params.m_MipMap; |
| 5273 | uint16_t param_array_index = PushSetTextureAsyncState(context->m_SetTextureAsyncState, texture, params, callback, user_data); |
| 5274 | |
| 5275 | Job job = {0}; |
| 5276 | job.m_Process = AsyncProcessCallback; |
| 5277 | job.m_Callback = AsyncCompleteCallback; |
| 5278 | job.m_Context = (void*) context; |
| 5279 | job.m_Data = (void*) (uintptr_t) param_array_index; |
| 5280 | |
| 5281 | HJob hjob = JobSystemCreateJob(context->m_JobContext, &job); |
| 5282 | JobSystemPushJob(context->m_JobContext, hjob); |
| 5283 | } |
| 5284 | else |
| 5285 | { |
| 5286 | VulkanTexture* tex = GetAssetFromContainer<VulkanTexture>(context->m_BaseContext.m_AssetHandleContainer, texture); |
| 5287 | VulkanSetTextureInternal(context, tex, params); |
| 5288 | if (callback) |
| 5289 | { |
| 5290 | callback(texture, user_data); |
| 5291 | } |
| 5292 | } |
| 5293 | } |
| 5294 | |
| 5295 | static float GetMaxAnisotrophyClamped(VulkanContext* context, float max_anisotropy_requested) |
| 5296 | { |
nothing calls this directly
no test coverage detected