-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WGSLShaderResource: implemented emulated resource arrays
- Loading branch information
1 parent
1592248
commit 1d8f843
Showing
10 changed files
with
407 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Tests/DiligentCoreTest/assets/shaders/WGSL/RWStructBufferArrays.psh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
struct BufferData0 | ||
{ | ||
float4 data; | ||
}; | ||
|
||
struct BufferData1 | ||
{ | ||
float4 data; | ||
}; | ||
|
||
RWStructuredBuffer<BufferData0> g_RWBuffArr0_3; | ||
RWStructuredBuffer<BufferData0> g_RWBuffArr0_5; | ||
|
||
RWStructuredBuffer<BufferData1> g_RWBuffArr1_2; | ||
RWStructuredBuffer<BufferData1> g_RWBuffArr1_0; | ||
|
||
RWStructuredBuffer<BufferData0> g_RWBuffArr2_1; | ||
RWStructuredBuffer<BufferData0> g_RWBuffArr2_0; | ||
|
||
float4 main() : SV_Target | ||
{ | ||
BufferData0 Data0; | ||
Data0.data = float4(1.0, 2.0, 3.0, 4.0); | ||
g_RWBuffArr0_3[0] = Data0; | ||
g_RWBuffArr0_5[0] = Data0; | ||
|
||
BufferData1 Data1; | ||
Data1.data = float4(1.0, 2.0, 3.0, 4.0); | ||
g_RWBuffArr1_2[0] = Data1; | ||
g_RWBuffArr1_0[0] = Data1; | ||
|
||
g_RWBuffArr2_1[0] = Data0; | ||
g_RWBuffArr2_0[0] = Data0; | ||
|
||
return float4(1.0, 0.0, 0.0, 1.0); | ||
} |
Oops, something went wrong.