I have no idea what should be promotion and what should be demotion, but
I think a specified format should at least be assignable to unspecified
format. It certainly helps get things compiling again.
While images are handles, they're not user-handles thus don't exist in
that name-space. slice.vert now compiles, but it looks like I have some
problems with sampled images/textures (sampler2D etc).
It's currently `@sampler(...)`, but I'm not sure about the name (should
it be `@sampled_image`, `@sampled` or similar?). However,
glsl-builtins.c uses `@image` and `@sampler` now, so one step closer to
my shaders compiling again.
I'll probably tweak the syntax a little (make placement of the type more
flexible and not generate an error if either type or other arguments are
missing), but I think I like it result:
typedef @image(int, 2D, Array, R8) bimage;
typedef @image(float, 3D, Rgba8) fimage;
typedef @image(float, Cube, Rgba8) cube;
typedef @image(float, Array, Cube) cube_array;
It has come time to get image handle type creation into Ruamoko. This
commit only gets the functions and types independent of glsl, @image (my
plan for dealing with the handles) isn't implemented yet.