driver: check against maximum texture size

Check against the maximum texture or render target size when creating a
resource.
fb_rawshader: fix compile warnings
driver: fix build with profiling