More fixes to OpenGL runtime
More fixes to OpenGL runtime

There were several places (notably halide_opengl_device_malloc) that
should have been checking for buf->dev == 0 but were not, leading to
odd quiet failures when running in “opaque” mode.

damienfir/Halide,ronen/Halide,lglucin/Halide,psuriana/Halide,jiawen/Halide,mcanthony/Halide,delcypher/Halide,jiawen/Halide,damienfir/Halide,adasworks/Halide,ayanazmat/Halide,smxlong/Halide,lglucin/Halide,adasworks/Halide,kgnk/Halide,mcanthony/Halide,fengzhyuan/Halide,ayanazmat/Halide,smxlong/Halide,delcypher/Halide,dan-tull/Halide,dan-tull/Halide,fengzhyuan/Halide,kenkuang1213/Halide,aam/Halide,kenkuang1213/Halide,rodrigob/Halide,fengzhyuan/Halide,tdenniston/Halide,myrtleTree33/Halide,smxlong/Halide,tdenniston/Halide,myrtleTree33/Halide,damienfir/Halide,ayanazmat/Halide,lglucin/Halide,fengzhyuan/Halide,damienfir/Halide,jiawen/Halide,damienfir/Halide,aam/Halide,smxlong/Halide,adasworks/Halide,delcypher/Halide,adasworks/Halide,dan-tull/Halide,rodrigob/Halide,rodrigob/Halide,ayanazmat/Halide,dougkwan/Halide,psuriana/Halide,kenkuang1213/Halide,mcanthony/Halide,ronen/Halide,jiawen/Halide,dougkwan/Halide,jiawen/Halide,rodrigob/Halide,psuriana/Halide,damienfir/Halide,psuriana/Halide,tdenniston/Halide,myrtleTree33/Halide,ayanazmat/Halide,kenkuang1213/Halide,myrtleTree33/Halide,mcanthony/Halide,rodrigob/Halide,ronen/Halide,fengzhyuan/Halide,kgnk/Halide,dougkwan/Halide,adasworks/Halide,dan-tull/Halide,mcanthony/Halide,adasworks/Halide,tdenniston/Halide,lglucin/Halide,delcypher/Halide,jiawen/Halide,jiawen/Halide,delcypher/Halide,kgnk/Halide,kgnk/Halide,dan-tull/Halide,delcypher/Halide,kenkuang1213/Halide,myrtleTree33/Halide,dougkwan/Halide,lglucin/Halide,ayanazmat/Halide,rodrigob/Halide,dougkwan/Halide,damienfir/Halide,smxlong/Halide,kgnk/Halide,delcypher/Halide,dan-tull/Halide,fengzhyuan/Halide,aam/Halide,damienfir/Halide,myrtleTree33/Halide,mcanthony/Halide,lglucin/Halide,delcypher/Halide,ronen/Halide,aam/Halide,myrtleTree33/Halide,ronen/Halide,ronen/Halide,fengzhyuan/Halide,fengzhyuan/Halide,kenkuang1213/Halide,smxlong/Halide,adasworks/Halide,ronen/Halide,mcanthony/Halide,myrtleTree33/Halide,kenkuang1213/Halide,ayanazmat/Halide,psuriana/Halide,kgnk/Halide,tdenniston/Halide,dougkwan/Halide,rodrigob/Halide,lglucin/Halide,dan-tull/Halide,tdenniston/Halide,ayanazmat/Halide,psuriana/Halide,dougkwan/Halide,tdenniston/Halide,kenkuang1213/Halide,tdenniston/Halide,psuriana/Halide,ronen/Halide,dougkwan/Halide,adasworks/Halide,dan-tull/Halide,kgnk/Halide,aam/Halide,kgnk/Halide,rodrigob/Halide,aam/Halide,smxlong/Halide,aam/Halide,smxlong/Halide,mcanthony/Halide