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
681 B27 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
8layout(binding = 0) buffer MyBlockName
9{
10    int a;
11    int b;
12    int c;
13    int d;
14} outputBuffer;
15
16layout(local_size_x = 1) in;
17void computeMain()
18{
19    outputBuffer.a = 1;
20    outputBuffer.b = 2;
21    outputBuffer.c = 3;
22    outputBuffer.d = 4;
23    // BUF: 1
24    // BUF-NEXT: 2
25    // BUF-NEXT: 3
26    // BUF-NEXT: 4
27}