Called on worker thread
| 1877 | |
| 1878 | // Called on worker thread |
| 1879 | static int AsyncProcessCallback(HJobContext, HJob hjob, void* pcontext, void* data) |
| 1880 | { |
| 1881 | HContext _context = (HContext)pcontext; |
| 1882 | NullContext* context = (NullContext*) _context; |
| 1883 | uint16_t param_array_index = (uint16_t) (size_t) data; |
| 1884 | SetTextureAsyncParams ap = GetSetTextureAsyncParams(context->m_SetTextureAsyncState, param_array_index); |
| 1885 | |
| 1886 | DM_MUTEX_OPTIONAL_SCOPED_LOCK(context->m_BaseContext.m_AssetHandleContainerMutex); |
| 1887 | NullTexture* tex = GetAssetFromContainer<NullTexture>(context->m_BaseContext.m_AssetHandleContainer, ap.m_Texture); |
| 1888 | if (tex) |
| 1889 | { |
| 1890 | SetTexture(_context, ap.m_Texture, ap.m_Params); |
| 1891 | int32_t v = dmAtomicGet32(&tex->m_Base.m_DataState); |
| 1892 | dmAtomicStore32(&tex->m_Base.m_DataState, v & ~(1<<ap.m_Params.m_MipMap)); |
| 1893 | } |
| 1894 | |
| 1895 | return 0; |
| 1896 | } |
| 1897 | |
| 1898 | // Called on thread where we update (which should be the main thread) |
| 1899 | static void AsyncCompleteCallback(HJobContext, HJob hjob, JobSystemStatus status, void* _context, void* data, int result) |
nothing calls this directly
no test coverage detected