Commit graph

6 commits

Author SHA1 Message Date
Bill Currie
03285c43ca [qfcc] Handle image type promotions etc
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.
2025-02-15 23:42:36 +09:00
Bill Currie
ce287201d3 [qfcc] Get sampled image types working
I'd forgotten to set the sampled field and messed up is_sampled_image().
2025-02-15 20:52:57 +09:00
Bill Currie
bc00bd0a0c [qfcc] Clean up image type creation
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).
2025-02-15 19:41:02 +09:00
Bill Currie
5ac80b1859 [qfcc] Add support for sampled images
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.
2025-02-15 17:15:55 +09:00
Bill Currie
6af42e979e [qfcc] Parse @image() in Ruamoko
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;
2025-02-11 18:08:13 +09:00
Bill Currie
1c20316c9a [qfcc] Make image handles independent of glsl
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.
2025-02-11 16:01:59 +09:00