projects
/
platform
/
upstream
/
glslang.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #2891 from dneto0/hlsl-namespace
[platform/upstream/glslang.git]
/
Test
/
hlsl.structbuffer.rw.frag
1
struct sb_t
2
{
3
float3 color;
4
bool test;
5
};
6
7
8
RWStructuredBuffer<sb_t> sbuf;
9
RWStructuredBuffer<float> sbuf2;
10
11
float4 main(uint pos : FOO) : SV_Target0
12
{
13
sbuf2[pos+1] = 42;
14
15
uint size;
16
uint stride;
17
sbuf.GetDimensions(size, stride);
18
19
if (sbuf[pos].test)
20
return float4(sbuf[pos].color + sbuf2[pos], 0);
21
else
22
return size + stride;
23
}