yum-mirror/slang

Making it easier to work with shaders

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

Jay KwakSupport integer typed textures for GLSL (#4329)df0a201d8

master
399 B14 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage compute -entry computeMain
2
3Texture2D<int4> t2D;
4SamplerState s;
5
6//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
7RWStructuredBuffer<int4> outputBuffer;
8
9void computeMain()
10{
11    // CHECK: error 41400: {{.*}} HLSL supports only float and half type textures
12    outputBuffer[0] = t2D.Sample(s, float2(0.0, 0.0));
13}
14