The sockets 771 775 are in principle incompatible, but with a small physical modification in the processor X5460 and the mobo, it can be used in a 775 mobo.
Nevertheless, most of the X5460 that are sold on the internet (but not all) have already made these adaptations so that you do not have to physically modify neithr the cpu nor the mobo. When you buy it, make sure it is adapted.
It is normally commented that to obtain the maximum benefit of the X5460, the microcode of the bios must be updated to include that of the X5460. I think that if you use windows 10 it is not necessary because the microcode is updated dynamically.
I recommend that you read carefully the links that I attach. Ignore everything related to physically modifying the mobo or the cpu since it will buy a modified cpu.
According to the second your mobo can put an X5460.
https://www.delidded.com/lga-771-to-775-adapter/
https://www.delidded.com/lga-771-to-775-adapter/3/#asrock
Of course X5460 is enough for a GTX 1050