yum-mirror/slang

Making it easier to work with shaders

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

Anders LeinoAdd validation for destination of atomic operations (#6093)04353fb76

master
931 B25 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target glsl -DTARGET_GLSL
2//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target spirv -skip-spirv-validation -emit-spirv-directly -DTARGET_SPIRV
3#version 430
4
5uint notShared;
6
7void computeMain()
8{
9    // CHECK: ([[# @LINE+1]]): error 41403
10    atomicAdd(notShared, 1u);
11    // CHECK: ([[# @LINE+1]]): error 41403
12    atomicAnd(notShared, 1u);
13    // CHECK: ([[# @LINE+1]]): error 41403
14    atomicCompSwap(notShared, 1u, 2u);
15    // CHECK: ([[# @LINE+1]]): error 41403
16    atomicExchange(notShared, 1u);
17    // CHECK: ([[# @LINE+1]]): error 41403
18    atomicMax(notShared, 1u);
19    // CHECK: ([[# @LINE+1]]): error 41403
20    atomicMin(notShared, 1u);
21    // CHECK: ([[# @LINE+1]]): error 41403
22    atomicOr(notShared, 1u);
23    // CHECK: ([[# @LINE+1]]): error 41403
24    atomicXor(notShared, 1u);
25}