by etching of pre-deposited switching material layers