yum-mirror/slang

Making it easier to work with shaders

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

Ellie HermaszewskaGLSL Passthrough support for SSBO types (#3446)a67cb0609

master
679 B26 linesraw
1//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl
2//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -emit-spirv-directly
3#version 430
4precision highp float;
5precision highp int;
6
7//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
8buffer MyBlockName2
9{
10    uint foo;
11    uint bar;
12    uint data[];
13} outputBuffer;
14
15layout(local_size_x = 1) in;
16void computeMain()
17{
18    outputBuffer.foo = 1;
19    outputBuffer.bar = 2;
20    outputBuffer.data[0] = 3;
21    outputBuffer.data[1] = 4;
22    // BUF: 1
23    // BUF-NEXT: 2
24    // BUF-NEXT: 3
25    // BUF-NEXT: 4
26}