void MaterialResource::SetSRVInternal(Texture& texture, bool immediate) { // Validate type if (m_type != ShaderResourceType::Unsupported) { assert_msg(IsSRVType(m_type), "MaterialResource is bound to a UAV, but an SRV is being assigned."); } // Texture must be fully loaded at this point assert(texture.IsReady()); m_cpuHandle = texture.GetSRV(); _ReadWriteBarrier(); DispatchToRenderThread(m_cpuHandle, immediate); }