Skip to content

Commit

Permalink
Merge pull request KhronosGroup#2661 from jaebaek/update_spirv_tools_…
Browse files Browse the repository at this point in the history
…and_unit_tests

Update spirv tools and unit tests
  • Loading branch information
greg-lunarg authored Jun 8, 2021
2 parents cb2c7fd + 02f1c80 commit 3d935ea
Show file tree
Hide file tree
Showing 7 changed files with 1,555 additions and 1,600 deletions.
483 changes: 226 additions & 257 deletions Test/baseResults/hlsl.load.2dms.dx10.frag.out

Large diffs are not rendered by default.

1,456 changes: 721 additions & 735 deletions Test/baseResults/hlsl.load.offset.dx10.frag.out

Large diffs are not rendered by default.

1,133 changes: 559 additions & 574 deletions Test/baseResults/hlsl.load.offsetarray.dx10.frag.out

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Test/hlsl.load.2dms.dx10.frag
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ uniform int2 c2;
uniform int3 c3;
uniform int4 c4;

uniform int o1;
uniform int2 o2;
uniform int3 o3;
uniform int4 o4;
int2 getOffset()
{
return int2(1, 1);
}

PS_OUTPUT main()
{
Expand All @@ -34,19 +34,19 @@ PS_OUTPUT main()
g_tTex2dmsu4.Load(c2, 3);

// 2DMS, offset
g_tTex2dmsf4.Load(c2, 3, o2);
g_tTex2dmsi4.Load(c2, 3, o2);
g_tTex2dmsu4.Load(c2, 3, o2);
g_tTex2dmsf4.Load(c2, 3, getOffset());
g_tTex2dmsi4.Load(c2, 3, getOffset());
g_tTex2dmsu4.Load(c2, 3, getOffset());

// 2DMSArray, no offset
g_tTex2dmsf4a.Load(c3, 3);
g_tTex2dmsi4a.Load(c3, 3);
g_tTex2dmsu4a.Load(c3, 3);

// 2DMSArray, offset
g_tTex2dmsf4a.Load(c3, 3, o2);
g_tTex2dmsi4a.Load(c3, 3, o2);
g_tTex2dmsu4a.Load(c3, 3, o2);
g_tTex2dmsf4a.Load(c3, 3, getOffset());
g_tTex2dmsi4a.Load(c3, 3, getOffset());
g_tTex2dmsu4a.Load(c3, 3, getOffset());

psout.Color = 1.0;
psout.Depth = 1.0;
Expand Down
36 changes: 23 additions & 13 deletions Test/hlsl.load.offset.dx10.frag
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,39 @@ uniform int2 c2;
uniform int3 c3;
uniform int4 c4;

uniform int o1;
uniform int2 o2;
uniform int3 o3;
uniform int4 o4;
int getOffset1()
{
return 1;
}

int2 getOffset2()
{
return int2(1, 1);
}

int3 getOffset3()
{
return int3(1, 1, 1);
}

PS_OUTPUT main()
{
PS_OUTPUT psout;

// 1D
g_tTex1df4.Load(c2, o1);
g_tTex1di4.Load(c2, o1);
g_tTex1du4.Load(c2, o1);
g_tTex1df4.Load(c2, getOffset1());
g_tTex1di4.Load(c2, getOffset1());
g_tTex1du4.Load(c2, getOffset1());

// 2D
g_tTex2df4.Load(c3, o2);
g_tTex2di4.Load(c3, o2);
g_tTex2du4.Load(c3, o2);
g_tTex2df4.Load(c3, getOffset2());
g_tTex2di4.Load(c3, getOffset2());
g_tTex2du4.Load(c3, getOffset2());

// 3D
g_tTex3df4.Load(c4, o3);
g_tTex3di4.Load(c4, o3);
g_tTex3du4.Load(c4, o3);
g_tTex3df4.Load(c4, getOffset3());
g_tTex3di4.Load(c4, getOffset3());
g_tTex3du4.Load(c4, getOffset3());

// Offset has no Cube or CubeArray forms

Expand Down
25 changes: 15 additions & 10 deletions Test/hlsl.load.offsetarray.dx10.frag
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,29 @@ uniform int2 c2;
uniform int3 c3;
uniform int4 c4;

uniform int o1;
uniform int2 o2;
uniform int3 o3;
uniform int4 o4;
int getOffset1()
{
return 1;
}

int2 getOffset2()
{
return int2(1, 1);
}

PS_OUTPUT main()
{
PS_OUTPUT psout;

// 1DArray
g_tTex1df4a.Load(c3, o1);
g_tTex1di4a.Load(c3, o1);
g_tTex1du4a.Load(c3, o1);
g_tTex1df4a.Load(c3, getOffset1());
g_tTex1di4a.Load(c3, getOffset1());
g_tTex1du4a.Load(c3, getOffset1());

// 2DArray
g_tTex2df4a.Load(c4, o2);
g_tTex2di4a.Load(c4, o2);
g_tTex2du4a.Load(c4, o2);
g_tTex2df4a.Load(c4, getOffset2());
g_tTex2di4a.Load(c4, getOffset2());
g_tTex2du4a.Load(c4, getOffset2());

// TODO:
// Load, SampleIndex
Expand Down
2 changes: 1 addition & 1 deletion known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools",
"commit" : "dc72924cb31cd9f3dbc3eb47e9d926cf641e3a07"
"commit" : "fb02131cb4ac74a357bb53039ca3dd8926bb3b14"
},
{
"name" : "spirv-tools/external/spirv-headers",
Expand Down

0 comments on commit 3d935ea

Please sign in to comment.