HLSL: Implement packoffset production.
This commit is contained in:
@@ -2,37 +2,37 @@ hlsl.buffer.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:23 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
|
||||
0:20 Function Parameters:
|
||||
0:20 'input' (in 4-component vector of float)
|
||||
0:29 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
|
||||
0:26 Function Parameters:
|
||||
0:26 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:21 Branch: Return with expression
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 'input' (in 4-component vector of float)
|
||||
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:21 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:27 Branch: Return with expression
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 'input' (in 4-component vector of float)
|
||||
0:27 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:27 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:27 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:27 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v4: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float)
|
||||
0:27 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
|
||||
0:? 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
|
||||
0:? 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3})
|
||||
0:? 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7})
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -41,37 +41,37 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:23 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
|
||||
0:20 Function Parameters:
|
||||
0:20 'input' (in 4-component vector of float)
|
||||
0:29 Function Definition: PixelShaderFunction(vf4; (global 4-component vector of float)
|
||||
0:26 Function Parameters:
|
||||
0:26 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:21 Branch: Return with expression
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 add (temp 4-component vector of float)
|
||||
0:21 'input' (in 4-component vector of float)
|
||||
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:21 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
|
||||
0:21 Constant:
|
||||
0:21 0 (const uint)
|
||||
0:27 Branch: Return with expression
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 add (temp 4-component vector of float)
|
||||
0:27 'input' (in 4-component vector of float)
|
||||
0:27 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:27 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||
0:27 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||
0:27 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:27 v4: direct index for structure (layout(column_major std430 offset=16 ) buffer 4-component vector of float)
|
||||
0:27 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7})
|
||||
0:27 Constant:
|
||||
0:27 0 (const uint)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
|
||||
0:? 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
|
||||
0:? 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 offset=20 ) uniform int i3})
|
||||
0:? 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 offset=16 ) buffer 4-component vector of float v4, layout(column_major std430 offset=48 ) buffer int i4, layout(column_major std430 offset=60 ) buffer float f1, layout(column_major std430 offset=64 ) buffer float f3, layout(column_major std430 offset=68 ) buffer float f4, layout(column_major std430 offset=72 ) buffer float f5, layout(column_major std430 ) buffer float f6, layout(column_major std430 ) buffer float f7})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
@@ -98,6 +98,12 @@ gl_FragCoord origin is upper left
|
||||
Name 32 ""
|
||||
MemberName 32 0 "v4"
|
||||
MemberName 32 1 "i4"
|
||||
MemberName 32 2 "f1"
|
||||
MemberName 32 3 "f3"
|
||||
MemberName 32 4 "f4"
|
||||
MemberName 32 5 "f5"
|
||||
MemberName 32 6 "f6"
|
||||
MemberName 32 7 "f7"
|
||||
Name 34 ""
|
||||
MemberDecorate 11 0 Offset 0
|
||||
Decorate 11 Block
|
||||
@@ -106,11 +112,17 @@ gl_FragCoord origin is upper left
|
||||
Decorate 20 BufferBlock
|
||||
Decorate 22 DescriptorSet 0
|
||||
MemberDecorate 26 0 Offset 0
|
||||
MemberDecorate 26 1 Offset 16
|
||||
MemberDecorate 26 1 Offset 20
|
||||
Decorate 26 Block
|
||||
Decorate 28 DescriptorSet 0
|
||||
MemberDecorate 32 0 Offset 0
|
||||
MemberDecorate 32 1 Offset 16
|
||||
MemberDecorate 32 0 Offset 16
|
||||
MemberDecorate 32 1 Offset 48
|
||||
MemberDecorate 32 2 Offset 60
|
||||
MemberDecorate 32 3 Offset 64
|
||||
MemberDecorate 32 4 Offset 68
|
||||
MemberDecorate 32 5 Offset 72
|
||||
MemberDecorate 32 6 Offset 76
|
||||
MemberDecorate 32 7 Offset 80
|
||||
Decorate 32 BufferBlock
|
||||
Decorate 34 DescriptorSet 0
|
||||
2: TypeVoid
|
||||
@@ -131,7 +143,7 @@ gl_FragCoord origin is upper left
|
||||
26: TypeStruct 7(fvec4) 14(int)
|
||||
27: TypePointer Uniform 26(struct)
|
||||
28: 27(ptr) Variable Uniform
|
||||
32: TypeStruct 7(fvec4) 14(int)
|
||||
32: TypeStruct 7(fvec4) 14(int) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float)
|
||||
33: TypePointer Uniform 32(struct)
|
||||
34: 33(ptr) Variable Uniform
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
|
||||
@@ -21,9 +21,9 @@ gl_FragCoord origin is upper left
|
||||
0:? Linker Objects
|
||||
0:? 'AmbientColor' (global 4-component vector of float)
|
||||
0:? 'ff1' (global bool Face)
|
||||
0:? 'ff2' (global 4-component vector of float)
|
||||
0:? 'ff3' (global 4-component vector of float)
|
||||
0:? 'ff4' (global 4-component vector of float FragCoord)
|
||||
0:? 'ff2' (layout(offset=4 ) global 4-component vector of float)
|
||||
0:? 'ff3' (layout(offset=4 ) global 4-component vector of float)
|
||||
0:? 'ff4' (layout(offset=4 ) global 4-component vector of float FragCoord)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -51,9 +51,9 @@ gl_FragCoord origin is upper left
|
||||
0:? Linker Objects
|
||||
0:? 'AmbientColor' (global 4-component vector of float)
|
||||
0:? 'ff1' (global bool Face)
|
||||
0:? 'ff2' (global 4-component vector of float)
|
||||
0:? 'ff3' (global 4-component vector of float)
|
||||
0:? 'ff4' (global 4-component vector of float FragCoord)
|
||||
0:? 'ff2' (layout(offset=4 ) global 4-component vector of float)
|
||||
0:? 'ff3' (layout(offset=4 ) global 4-component vector of float)
|
||||
0:? 'ff4' (layout(offset=4 ) global 4-component vector of float FragCoord)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
@@ -74,6 +74,9 @@ gl_FragCoord origin is upper left
|
||||
Name 28 "ff3"
|
||||
Name 29 "ff4"
|
||||
Decorate 26(ff1) BuiltIn FrontFacing
|
||||
Decorate 27(ff2) Offset 4
|
||||
Decorate 28(ff3) Offset 4
|
||||
Decorate 29(ff4) Offset 4
|
||||
Decorate 29(ff4) BuiltIn FragCoord
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@@ -14,8 +14,8 @@ gl_FragCoord origin is upper left
|
||||
0:37 's2' (global structure{temp 4-component vector of float i})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 ff4: direct index for structure (temp 4-component vector of float FragCoord)
|
||||
0:37 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
|
||||
0:37 ff4: direct index for structure (layout(offset=4 ) temp 4-component vector of float FragCoord)
|
||||
0:37 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(offset=4 ) temp bool ff3, layout(offset=4 ) temp 4-component vector of float FragCoord ff4})
|
||||
0:37 Constant:
|
||||
0:37 7 (const int)
|
||||
0:39 Branch: Return with expression
|
||||
@@ -23,7 +23,7 @@ gl_FragCoord origin is upper left
|
||||
0:? Linker Objects
|
||||
0:? 's1' (global structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d})
|
||||
0:? 's2' (global structure{temp 4-component vector of float i})
|
||||
0:? 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
|
||||
0:? 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(offset=4 ) temp bool ff3, layout(offset=4 ) temp 4-component vector of float FragCoord ff4})
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -44,8 +44,8 @@ gl_FragCoord origin is upper left
|
||||
0:37 's2' (global structure{temp 4-component vector of float i})
|
||||
0:37 Constant:
|
||||
0:37 0 (const int)
|
||||
0:37 ff4: direct index for structure (temp 4-component vector of float FragCoord)
|
||||
0:37 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
|
||||
0:37 ff4: direct index for structure (layout(offset=4 ) temp 4-component vector of float FragCoord)
|
||||
0:37 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(offset=4 ) temp bool ff3, layout(offset=4 ) temp 4-component vector of float FragCoord ff4})
|
||||
0:37 Constant:
|
||||
0:37 7 (const int)
|
||||
0:39 Branch: Return with expression
|
||||
@@ -53,7 +53,7 @@ gl_FragCoord origin is upper left
|
||||
0:? Linker Objects
|
||||
0:? 's1' (global structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d})
|
||||
0:? 's2' (global structure{temp 4-component vector of float i})
|
||||
0:? 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float FragCoord ff4})
|
||||
0:? 's4' (global structure{smooth in 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool Face ff1, layout(offset=4 ) temp bool ff2, layout(offset=4 ) temp bool ff3, layout(offset=4 ) temp 4-component vector of float FragCoord ff4})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
|
||||
@@ -13,7 +13,13 @@ cbuffer cbufName : register(b2) {
|
||||
|
||||
tbuffer tbufName : register(b8) {
|
||||
float4 v4 : packoffset(c1);
|
||||
int i4 : packoffset(c3);
|
||||
int i4 : packoffset(c3);
|
||||
float f1 : packoffset(c3.w);
|
||||
float f3 : packoffset(c4.x);
|
||||
float f4 : packoffset(c4.y);
|
||||
float f5 : packoffset(c4.z);
|
||||
float f6 : packoffset(c);
|
||||
float f7;
|
||||
};
|
||||
|
||||
float4 PixelShaderFunction(float4 input) : COLOR0
|
||||
|
||||
Reference in New Issue
Block a user