yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Simon Kallweitupdate slang-rhi (#6587)ae1a5e408

master
760 B27 linesraw
1//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target glsl
2//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly
3//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
4buffer MyBlockName2
5{
6    uint data[1];
7} outputBuffer;
8
9layout(local_size_x = 4) in;
10
11//TEST_INPUT: set someImage = RWTexture2D(format=RGBA16Float, size=1, content=one, mipMaps = 1)
12uniform layout(binding=0,rgba16f) readonly image2D someImage;
13
14// CHECK: error 30048
15bool checkAllImageSizes(writeonly image2D val)
16{
17    return true
18        && imageSize(val) == ivec2(1)
19        ;
20}
21
22void computeMain()
23{
24    outputBuffer.data[0] = true
25        && checkAllImageSizes(someImage);
26        ;
27}